PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: 3.A.debugging Size: 1.93 KB
/usr/share/doc/perl-Expect/tutorial/3.A.debugging

#!/usr/bin/perl
#	This example demonstrates how to use the debugging features in 
#expect. They're reasonably straghtforward.
#
#	There are 3 basic ways you can debug a script:
#	
#	1. Log_Stdout 
#
#	By setting $Expect::Log_Stdout you control whether or not processes
#will echo to the screen or not. Having it turned on can be helpful so you
#can watch what a process is doing. Alternately, for a process that is already
#running you can do $process->log_stdout(1); which will turn on process 
#output for the process from that instant on. $process->log_stdout(0) will
#turn it off.
#	By default $Expect::Log_Stdout == 1. Initialized handles (discussed
#later) may also echo to STDOUT, but they don't do so by default. You have
#to manually tell them to echo. You wouldn't want your log file jabbering at
#you would you? Anyway, that will make sense later.
#
#	2. Exp_Internal
#
#	Setting $Exp_Internal=1 (or $process->exp_internal(1)) will output
#pattern matching information for expect() calls to STDERR. You can trap
#this by doing "perl expect_script.pl 2>debug.out" if you are using any of
#the bourne-ish shells. For people who use csh, don't. "exec bash" will take
#care of that straightaway. This is handy so program output and debugging output
#don't go to the same place.
#
#	3. Debug
#	
#	Setting $Expect::Debug = debug level(or $process->debug(debug level))
#will show other stuff, such as pids, output during interaction, and other
#miscellaneous output not covered by the above two items. In combination with
#Exp_Internal you can capture a lot of good information about what your script
#is doing. Debugging info also goes to STDERR.
#
#
#	This example will show (lots) of debugging info.


use Expect;

$Expect::Log_Stdout=1;
$Expect::Debug=3;
$Expect::Exp_Internal=1;

# lpc is a bsd printer control program.  It's included in every Unix I
# deal with.
$lpc = Expect->spawn("lpc");

$lpc->expect(30,"lpc> ") && print $lpc "stat\r";

$lpc->hard_close();

Directory Contents

Dirs: 0 × Files: 10

Name Size Perms Modified Actions
2.37 KB lrw-r--r-- 2017-05-15 15:55:28
Edit Download
3.01 KB lrw-r--r-- 2019-08-23 14:02:45
Edit Download
3.95 KB lrw-r--r-- 2019-08-23 14:02:45
Edit Download
1.93 KB lrw-r--r-- 2019-08-23 14:02:45
Edit Download
928 B lrw-r--r-- 2019-08-23 14:02:45
Edit Download
1.11 KB lrw-r--r-- 2019-08-23 14:02:45
Edit Download
2.39 KB lrw-r--r-- 2019-08-23 14:02:45
Edit Download
3.18 KB lrw-r--r-- 2019-08-23 14:02:45
Edit Download
1.79 KB lrw-r--r-- 2019-08-23 14:02:45
Edit Download
644 B lrw-r--r-- 2017-05-15 15:55:28
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI