You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(26) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(5) |
Feb
(3) |
Mar
(11) |
Apr
(10) |
May
(2) |
Jun
(5) |
Jul
(13) |
Aug
(2) |
Sep
(3) |
Oct
(10) |
Nov
(18) |
Dec
(29) |
2002 |
Jan
(12) |
Feb
(14) |
Mar
(73) |
Apr
(28) |
May
(21) |
Jun
(39) |
Jul
(40) |
Aug
(42) |
Sep
(20) |
Oct
(4) |
Nov
(9) |
Dec
(18) |
2003 |
Jan
(2) |
Feb
(8) |
Mar
(6) |
Apr
(24) |
May
(24) |
Jun
(14) |
Jul
(16) |
Aug
(36) |
Sep
(34) |
Oct
(23) |
Nov
(4) |
Dec
(15) |
2004 |
Jan
(6) |
Feb
(13) |
Mar
(7) |
Apr
(5) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
|
Sep
(2) |
Oct
(16) |
Nov
(4) |
Dec
(9) |
2005 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
(10) |
May
(5) |
Jun
(13) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(9) |
2006 |
Jan
|
Feb
(10) |
Mar
(22) |
Apr
(14) |
May
(5) |
Jun
(4) |
Jul
(19) |
Aug
(7) |
Sep
(16) |
Oct
(4) |
Nov
(1) |
Dec
(16) |
2007 |
Jan
(17) |
Feb
|
Mar
(35) |
Apr
(5) |
May
(20) |
Jun
(11) |
Jul
(33) |
Aug
(3) |
Sep
(2) |
Oct
(11) |
Nov
(23) |
Dec
(5) |
2008 |
Jan
(10) |
Feb
(9) |
Mar
|
Apr
(6) |
May
(8) |
Jun
(7) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(20) |
2009 |
Jan
(8) |
Feb
(8) |
Mar
(3) |
Apr
(8) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(7) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(7) |
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
(1) |
Dec
(4) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(3) |
May
(2) |
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(30) |
Apr
(10) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(12) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Blackstone, J. D. <jda...@ci...> - 2002-08-05 13:59:08
|
> -----Original Message----- > From: Roland Giersig [mailto:RGi...@cp...] > Sent: Sunday, August 04, 2002 5:00 AM > To: Blackstone, J. David > Cc: exp...@li... > Subject: RE: [Expectperl-discuss] quotes around $scalar > > > Quoting "Blackstone, J. David" <jda...@ci...>: > > > Another thing I meant to say about regexes is I think it would be > > really cool if we could drop -re altogether. To my mind it > seems like the > > method should use ref to see if you've passed a qr// regex > or a plain > > scalar. Of course, my mind doesn't work like anyone else's, and it > would break > > backward compatibility. > > Right, and that's why it's not gonna happen. Please note > that with the > new syntax with callbacks it's already the default: > > $exp->expect($timeout, > [ "regexp", \&callback ], > [ qr/regexp/, \&callback ],); > > And this is the much more powerful syntax, so I personally > consider the > old syntax (where you have to test which regexp index has matched) > somewhat obsolete and only a beginners drug to get them hooked until > they realize the full power of callbacks... :-) Ah, that makes sense. I only use the older syntax for very simple statements, e.g.: $x->expect($t, "string"); that is, when I want to do the equivalent to TCL/Expect's expect string Of course, with ref $regex, there's no telling what you can do. :) jdb |
From: Blackstone, J. D. <jda...@ci...> - 2002-08-05 13:57:52
|
> Btw, just noticed this. Did you mean: > > $exp->expect($timeout, > [ "regexp", \&callback ], > ^^^^^^^^ > > "substring"? If we allow for a Regex to be passed, DWIM > would seem > to indicate that a non-Regex would be a substring. > Gee, come to think of it, if we allow for Regex objects to be > passed, we probably don't need the ugly tomfoolery for > multiline matching, etc. And that's why I think precompiled regexes are my favorite new feature in all of Perl that's happened since 5.005. Probably favorite new feature since XS, to be honest. It's amazing what you can do with precompiled regexes. Especially with ref $regex. (Sounds like we lit a fire for Roland. :) ) jdb |
From: Austin S. <te...@of...> - 2002-08-04 21:14:11
|
On Sun, Aug 04, 2002 at 12:00:25PM +0200, Roland Giersig wrote: > Quoting "Blackstone, J. David" <jda...@ci...>: > > > Another thing I meant to say about regexes is I think it would be > > really cool if we could drop -re altogether. To my mind it seems like the > > method should use ref to see if you've passed a qr// regex or a plain > > scalar. Of course, my mind doesn't work like anyone else's, and it > would break > > backward compatibility. > > Right, and that's why it's not gonna happen. Please note that with the > new syntax with callbacks it's already the default: > > $exp->expect($timeout, > [ "regexp", \&callback ], > [ qr/regexp/, \&callback ],); > Btw, just noticed this. Did you mean: $exp->expect($timeout, [ "regexp", \&callback ], ^^^^^^^^ "substring"? If we allow for a Regex to be passed, DWIM would seem to indicate that a non-Regex would be a substring. Gee, come to think of it, if we allow for Regex objects to be passed, we probably don't need the ugly tomfoolery for multiline matching, etc. Austin |
From: Roland G. <RGi...@cp...> - 2002-08-04 20:51:42
|
>>Hmm, I offhand don't know a means to find out if a given scalar already >>contains a precompiled regexp. If such a check is available I'd surely >>implement it to make expect() even more DWIMmish in that regard, making >>sure that a precompiled regexp wouldn't be handled with a substr match... >> >>Anybody got an idea? >> >> > > $foo = qr /stuff/; > print ref($foo); > > prints "Regexp". Is that what you mean? *smack* Ugh, yes, and I was looking into Scalar::Util and thought about digging into perl internas and write some .xs code... Looks like it's time to add some more DWIM to Expect... Roland -- RGi...@cp... |
From: Austin S. <te...@of...> - 2002-08-04 19:45:57
|
> And this is the much more powerful syntax, so I personally consider the > old syntax (where you have to test which regexp index has matched) > somewhat obsolete and only a beginners drug to get them hooked until > they realize the full power of callbacks... :-) > It's definitely enables more of the tcl-ish syntax. > > However, this seems to be more in keeping with Perl 6's newfound "A > > regex is not really a string" philosophy. qr// was a great piece of > > syntax, and I'd like to see it be a more first-class member of the > language with > > some modules. > > Hmm, I offhand don't know a means to find out if a given scalar already > contains a precompiled regexp. If such a check is available I'd surely > implement it to make expect() even more DWIMmish in that regard, making > sure that a precompiled regexp wouldn't be handled with a substr match... > > Anybody got an idea? > $foo = qr /stuff/; print ref($foo); prints "Regexp". Is that what you mean? Austin |
From: Roland G. <RGi...@cp...> - 2002-08-04 10:30:14
|
> I'm using Expect to start a telnet session from a linux box to a sun > workstation and afterwards open a telnet to a cisco router. Expect > enters interactive mode when the login prompt is displayed, works > fine. When I'm going to enter my user and pass, the password is > visible (normally hidden) - how can I change this behavior? From within an interact() call, you cannot. The point is that the telnet connection sets the pty into non-echoing mode during password entry, but this setting isn't propagated automatically to the users terminal. A work-around would be to ask for the username/password in advance (without echoing) and automating the login sequence in the background. Hope this helps, Roland PS: sorry for the delay, I have been on vacation last week. -- RGi...@cp... |
From: Roland G. <RGi...@cp...> - 2002-08-04 10:12:54
|
> Whatever the case I still think it should wait forever trying to > match. It probably did, it matched on the first 'y', 'e' OR 's' that came along. D'oh! Roland -- RGi...@cp... |
From: Roland G. <RGi...@cp...> - 2002-08-04 10:08:24
|
> I double checked my script and tried using the expcet object. The > following are 2 cases I tried. The first one is one without '-i'. > When using this method, everything works fine. I turned on > exp_internal and saw that expect actually sent and got a match. > However, when I used the 2nd method with the '-i', the match field is > blank. ($expect_arg: OK, $timeout: 120) > > 1) $temp = $session->expect( $timeout, ['-re', $expect_arg], > ['timeout', sub {print "TIMEOUT > expecting $expect_arg\n"}]); > > > 2) $temp = $session->expect( $timeout, > '-i', [$session], > ['-re', > $expect_arg], > ['timeout', sub {print > "TIMEOUT expecting $expect_arg\n"}] > ); Try 2) as $temp = expect($timeout, '-i', ...) without the object tagged onto the front. Should work then... Also, set $Expect::Debug = 1 to get further internal information on how Expect handles your call... Hope this helps, Roland -- RGi...@cp... |
From: Roland G. <RGi...@cp...> - 2002-08-04 10:01:10
|
Quoting "Blackstone, J. David" <jda...@ci...>: > Another thing I meant to say about regexes is I think it would be > really cool if we could drop -re altogether. To my mind it seems like the > method should use ref to see if you've passed a qr// regex or a plain > scalar. Of course, my mind doesn't work like anyone else's, and it would break > backward compatibility. Right, and that's why it's not gonna happen. Please note that with the new syntax with callbacks it's already the default: $exp->expect($timeout, [ "regexp", \&callback ], [ qr/regexp/, \&callback ],); And this is the much more powerful syntax, so I personally consider the old syntax (where you have to test which regexp index has matched) somewhat obsolete and only a beginners drug to get them hooked until they realize the full power of callbacks... :-) > However, this seems to be more in keeping with Perl 6's newfound "A > regex is not really a string" philosophy. qr// was a great piece of > syntax, and I'd like to see it be a more first-class member of the language with > some modules. Hmm, I offhand don't know a means to find out if a given scalar already contains a precompiled regexp. If such a check is available I'd surely implement it to make expect() even more DWIMmish in that regard, making sure that a precompiled regexp wouldn't be handled with a substr match... Anybody got an idea? Roland -- RGi...@cp... |
From: Heidi Ng <ng_...@ya...> - 2002-07-31 21:49:01
|
I double checked my script and tried using the expcet object. The following are 2 cases I tried. The first one is one without '-i'. When using this method, everything works fine. I turned on exp_internal and saw that expect actually sent and got a match. However, when I used the 2nd method with the '-i', the match field is blank. ($expect_arg: OK, $timeout: 120) 1) $temp = $session->expect( $timeout, ['-re', $expect_arg], ['timeout', sub {print "TIMEOUT expecting $expect_arg\n"}]); 2) $temp = $session->expect( $timeout, '-i', [$session], ['-re', $expect_arg], ['timeout', sub {print "TIMEOUT expecting $expect_arg\n"}] ); ------------------------------------------------------------------------------------------------------------------ Here's the exp_internal for the 1) and 2) case.... is my syntax wrong? ------------------------------------------------------------------------------------------------------------------ Starting EXPECT pattern matching... Expect::expect('Expect=GLOB(0xa863a8c)', 120, 'ARRAY(0xa869b58)', 'ARRAY (0xa86ec50)') called at VQT_utils.pl line 196 main::expMatch('Expect=GLOB(0xa863a8c)', 1008, 'reset', 'OK') called at VQT_abacus.pl line 141 main::abacusReset('Expect=GLOB(0xa863a8c)', 1008) called at VQT_abacus.p l line 264 main::abacusRun('Expect=GLOB(0xa863a8c)', 1008, 'C:\\Abacus5.11\\BIN', ' reset n id(6): Does ` \033[13;1H\033[0m spawn id(6): Does ` \033[13;1H\033[0m OK spawn id(6): Does ` \033[13;1H\033[0m \ 033[13;1H\033[0mreset\r\033[13;1H\033[0mr \033[13;1H\033[0mre \033[13;1H\033[0mres \033[1 3;1H\033[0mrese \033[13;5H\033[0m\033[13;1H\033[0mreset \033[14;1H\033[0m \033[14;1H\033[0m\ 033[14;1H\033[0mOK \033[15;1H\033[0m ' match: pattern #1: -re `OK'? YES!! Before match string: ` \033[13;1H\ 033[0m \033[13;1H\033[0mreset\r\033[13;1H\033[0mr \033[13;1H\033[0mre \033[13;1H\033[0 mres \033[13;1H\033[0mrese \033[13;5H\033[0m\033[13;1H\033[0mreset \033[14;1H\033[0m \033[14;1H\ 033[0m\033[14;1H\033[0m' Match string: `OK' After match string: ` \033[15;1H\033[0m ===================================================================================== Starting EXPECT pattern matching... Expect::expect('Expect=GLOB(0xa863a98)', 120, '-i', 'ARRAY(0xa869b64)', 'ARRAY(0xa869a50)', 'ARRAY(0xa869ad4)') called at VQT_utils.pl line 200 main::expMatch('Expect=GLOB(0xa863a98)', 884, 'reset', 'OK') called at V QT_abacus.pl line 141 main::abacusReset('Expect=GLOB(0xa863a98)', 884) called at VQT_abacus.pl line 264 main::abacusRun('Expect=GLOB(0xa863a98)', 884, 'C:\\Abacus5.11\\BIN', 'C :\DATA\VQT\Test_Results\1028151574', 'VQT_SIP_basic_short.env', 60, 1, 'SIP.phn' reset main::VQT_run(1) called at vqt_main.pl line 54 OK spawn id(6): Does ` \033[13;1H\033[0m \ 033[13;1H\033[0mreset\r\033[13;1H\033[0mr \033[13;1H\033[0mre \033[13;1H\033[0mres \033[1 3;1H\033[0mrese \033[13;5H\033[0m\033[13;1H\033[0mreset \033[14;1H\033[0m \033[14;1H\033[0m\ 033[14;1H\033[0mOK \033[15;1H\033[0m \033[15;1H\033[0m' match: ===================================================================================== ' Austin Schutz <te...@of...> wrote: On Wed, Jul 31, 2002 at 03:26:00PM -0500, Blackstone, J. David wrote: > I don't think you're supposed to use pids with -i; I think you're supposed > to use the Expect object itself. Otherwise, how would it get the object to > expect on? > That's right. I think the docs are clear on that point, but they seem a little vague that expect isn't supposed to be called as an object method: $object->expect($timeout, @match_patterns) or, more like Tcl/Expect, expect($timeout, '-i', [ $obj1, $obj2, ... ], [ $re_pattern, sub { ...; exp_continue; }, @subparms, [ 'eof', sub { ... } ], [ 'timeout', sub { ... }, \$subparm1 ], '-i', [ $objn, ...], '-ex', $exact_pattern, sub { ... }, $exact_pattern, sub { ...; exp_continue_timeout; }, '-re', $re_pattern, sub { ... }, '-i', \@object_list, @pattern_list, ...); which might imply something like $object->expect($timeout, '-i'...). Perhaps it would be clearer to have: Expect::expect($timeout, '-i', [ $obj1, $obj2, ... ], [ $re_pattern, sub { ...; exp_continue; }, @subparms, [ 'eof', sub { ... } ], [ 'timeout', sub { ... }, \$subparm1 ], '-i', [ $objn, ...], '-ex', $exact_pattern, sub { ... }, $exact_pattern, sub { ...; exp_continue_timeout; }, '-re', $re_pattern, sub { ... }, '-i', \@object_list, @pattern_list, ...); Austin --------------------------------- Do You Yahoo!? Yahoo! Health - Feel better, live better |
From: Heidi Ng <ng_...@ya...> - 2002-07-31 21:21:12
|
I tired using the Expect object as suppose to the object's pid. However, it didn't work, so that's why I tried using the pid. The thing I was trying to do was: 1) created an Expect object...did some print's and expect's 2) the script went off to do something else. 3) wanted to talk to the expect object created previously but couldn't. Let me try it with using the object again. Thanks! Heidi Austin Schutz <te...@of...> wrote: On Wed, Jul 31, 2002 at 03:26:00PM -0500, Blackstone, J. David wrote: > I don't think you're supposed to use pids with -i; I think you're supposed > to use the Expect object itself. Otherwise, how would it get the object to > expect on? > That's right. I think the docs are clear on that point, but they seem a little vague that expect isn't supposed to be called as an object method: $object->expect($timeout, @match_patterns) or, more like Tcl/Expect, expect($timeout, '-i', [ $obj1, $obj2, ... ], [ $re_pattern, sub { ...; exp_continue; }, @subparms, [ 'eof', sub { ... } ], [ 'timeout', sub { ... }, \$subparm1 ], '-i', [ $objn, ...], '-ex', $exact_pattern, sub { ... }, $exact_pattern, sub { ...; exp_continue_timeout; }, '-re', $re_pattern, sub { ... }, '-i', \@object_list, @pattern_list, ...); which might imply something like $object->expect($timeout, '-i'...). Perhaps it would be clearer to have: Expect::expect($timeout, '-i', [ $obj1, $obj2, ... ], [ $re_pattern, sub { ...; exp_continue; }, @subparms, [ 'eof', sub { ... } ], [ 'timeout', sub { ... }, \$subparm1 ], '-i', [ $objn, ...], '-ex', $exact_pattern, sub { ... }, $exact_pattern, sub { ...; exp_continue_timeout; }, '-re', $re_pattern, sub { ... }, '-i', \@object_list, @pattern_list, ...); Austin --------------------------------- Do You Yahoo!? Yahoo! Health - Feel better, live better |
From: Austin S. <te...@of...> - 2002-07-31 20:41:07
|
On Wed, Jul 31, 2002 at 03:26:00PM -0500, Blackstone, J. David wrote: > I don't think you're supposed to use pids with -i; I think you're supposed > to use the Expect object itself. Otherwise, how would it get the object to > expect on? > That's right. I think the docs are clear on that point, but they seem a little vague that expect isn't supposed to be called as an object method: $object->expect($timeout, @match_patterns) or, more like Tcl/Expect, expect($timeout, '-i', [ $obj1, $obj2, ... ], [ $re_pattern, sub { ...; exp_continue; }, @subparms, [ 'eof', sub { ... } ], [ 'timeout', sub { ... }, \$subparm1 ], '-i', [ $objn, ...], '-ex', $exact_pattern, sub { ... }, $exact_pattern, sub { ...; exp_continue_timeout; }, '-re', $re_pattern, sub { ... }, '-i', \@object_list, @pattern_list, ...); which might imply something like $object->expect($timeout, '-i'...). Perhaps it would be clearer to have: Expect::expect($timeout, '-i', [ $obj1, $obj2, ... ], [ $re_pattern, sub { ...; exp_continue; }, @subparms, [ 'eof', sub { ... } ], [ 'timeout', sub { ... }, \$subparm1 ], '-i', [ $objn, ...], '-ex', $exact_pattern, sub { ... }, $exact_pattern, sub { ...; exp_continue_timeout; }, '-re', $re_pattern, sub { ... }, '-i', \@object_list, @pattern_list, ...); Austin |
From: Blackstone, J. D. <jda...@ci...> - 2002-07-31 20:26:04
|
I don't think you're supposed to use pids with -i; I think you're supposed to use the Expect object itself. Otherwise, how would it get the object to expect on? jdb -----Original Message----- From: Heidi Ng [mailto:ng_...@ya...] Sent: Wednesday, July 31, 2002 3:11 PM To: exp...@li... Subject: [Expectperl-discuss] using multiple expect objects Hi, I am trying to write a script program which spawns and uses multiple Expect session. I tried using the '-i' option with the Expect object's PID but it gave me the following error message. I got the pid by using $pid = $session->pid() and this returned an integer '1088; to me. Can someone please help me? Thanx! Heidi Can't use string ("1088") as a symbol ref while "strict refs" in use at /usr/lib /perl5/5.6.1/Expect.pm line 564. sub expMatch { my ($session, $pid, $send_arg, $expect_arg) = @_; print $session "$send_arg\r" $temp = $session->expect( $timeout, '-i', [$pid], ['-re', $expect_arg], ['timeout', sub {print "TIMEOUT expecting $expect_arg\n"}] ); } Do You Yahoo!? Yahoo! Health - Feel better, live better |
From: Heidi Ng <ng_...@ya...> - 2002-07-31 20:12:09
|
Hi, I am trying to write a script program which spawns and uses multiple Expect session. I tried using the '-i' option with the Expect object's PID but it gave me the following error message. I got the pid by using $pid = $session->pid() and this returned an integer '1088; to me. Can someone please help me? Thanx! Heidi Can't use string ("1088") as a symbol ref while "strict refs" in use at /usr/lib /perl5/5.6.1/Expect.pm line 564. sub expMatch { my ($session, $pid, $send_arg, $expect_arg) = @_; print $session "$send_arg\r" $temp = $session->expect( $timeout, '-i', [$pid], ['-re', $expect_arg], ['timeout', sub {print "TIMEOUT expecting $expect_arg\n"}] ); } --------------------------------- Do You Yahoo!? Yahoo! Health - Feel better, live better |
From: Austin S. <te...@of...> - 2002-07-31 17:12:22
|
On Wed, Jul 31, 2002 at 10:11:42AM -0500, Blackstone, J. David wrote: > Another thing I meant to say about regexes is I think it would be really > cool if we could drop -re altogether. I don't see why you'd want to drop it. It'd be a slight bit of cruft, but I can't see it breaking anything. -re is also familiar for folks migrating from Tcl. > To my mind it seems like the method > should use ref to see if you've passed a qr// regex or a plain scalar. Of > course, my mind doesn't work like anyone else's, and it would break backward > compatibility. > It won't if you leave -re in and allow folks to use either method. Definitely the qr// method seems more perlish. Austin |
From: Blackstone, J. D. <jda...@ci...> - 2002-07-31 15:11:48
|
Another thing I meant to say about regexes is I think it would be really cool if we could drop -re altogether. To my mind it seems like the method should use ref to see if you've passed a qr// regex or a plain scalar. Of course, my mind doesn't work like anyone else's, and it would break backward compatibility. However, this seems to be more in keeping with Perl 6's newfound "A regex is not really a string" philosophy. qr// was a great piece of syntax, and I'd like to see it be a more first-class member of the language with some modules. jdb |
From: Blackstone, J. D. <jda...@ci...> - 2002-07-31 14:43:45
|
Just got back from a week off, and I saw the discussion about $x->expect($t, '-re' => "$regex"); As many mentioned, putting quotes around the $regex is unnecessary and may cause problems. This is true in general for any scalar. The only time you want quotes is when you want to do "other text $scalar more text." In fact, this is in the Perl FAQ in perlfaq4 under "What's wrong with always quoting "$vars"". jdb |
From: Geiger, M. <Mic...@te...> - 2002-07-31 11:30:59
|
I'm using Expect to start a telnet session from a linux box to a sun workstation and afterwards open a telnet to a cisco router. Expect enters interactive mode when the login prompt is displayed, works fine. When I'm going to enter my user and pass, the password is visible (normally hidden) - how can I change this behavior? Thanks Michael |
From: Austin S. <te...@of...> - 2002-07-24 16:42:16
|
On Wed, Jul 24, 2002 at 08:06:24AM -0700, ex...@ih... wrote: > On Wed, 24 Jul 2002 00:08:02 -0700 > Austin Schutz <te...@of...> wrote: > > > > > > > $item could be like: [yes] or [no] or [/home/efudd] etc., etc. > > > > > > > ..and a regexp of /[yes]/ will match a letter that is not a y, e, or s > > you mean "that is a y, e, or s", [^yes] is the anti-match > Argh! I hate those late night brain typos! Austin |
From: <ex...@ih...> - 2002-07-24 15:06:28
|
On Wed, 24 Jul 2002 00:08:02 -0700 Austin Schutz <te...@of...> wrote: > > > > $item could be like: [yes] or [no] or [/home/efudd] etc., etc. > > > > ..and a regexp of /[yes]/ will match a letter that is not a y, e, or s you mean "that is a y, e, or s", [^yes] is the anti-match > (perldoc perlre). I found myself getting frustrated trying to track down bugs > induced by strings which contained dots or question marks, which have special > meaning in perl regexps - thus the default literal matching behavior of > non-archaic versions of Expect. If you don't use '-re' you don't have to > worry about regexp meanings of characters, and the behavior is more > predictable. > That said, if you really want to use a regexp, try setting > $Expect::Exp_Internal=1 so you can see what/how the regexp is actually > matching. Whatever the case I still think it should wait forever trying to match. > > Austin > |
From: Austin S. <te...@of...> - 2002-07-24 07:08:36
|
> > $item could be like: [yes] or [no] or [/home/efudd] etc., etc. > ..and a regexp of /[yes]/ will match a letter that is not a y, e, or s (perldoc perlre). I found myself getting frustrated trying to track down bugs induced by strings which contained dots or question marks, which have special meaning in perl regexps - thus the default literal matching behavior of non-archaic versions of Expect. If you don't use '-re' you don't have to worry about regexp meanings of characters, and the behavior is more predictable. That said, if you really want to use a regexp, try setting $Expect::Exp_Internal=1 so you can see what/how the regexp is actually matching. Austin |
From: <ex...@ih...> - 2002-07-24 06:12:16
|
On Tue, 23 Jul 2002 17:01:51 +0100 (BST) Stephen <S.J...@du...> wrote: > It seems to me that the only problem here is that you are using the key, > value pair system like a hash. When i want to do a regexp match i always > do something like: > > $obj->expect(undef,'-re',$item); > > this works for me. I'm not sure it's intended to work with the => is it? Yes, I understood that idiom to be acceptable too, although as someone pointed out the quotes may introduce problems. > > Stephen > > >In my previous post I noted that I was seeing this which > >I only saw when I used $obj->expect(undef, -re => "$item"); > >and this showed up > >Use of uninitialized value in concatenation (.) or string at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1388 > > > > > >If I use this I have no problems: > >$obj->expect(undef, $item); > > > > > >So what's different about the code path for those two that causes one to fail? > > > >Essentially that's all the code there is, it waits for a string which is > >a "key" value and provides the corresponding "value" value. It almost > >appears as if the -re idiom is not respecting the undef for the timeout > >value and therefore is not waiting indefinitely. > > > -------- "They sought it with thimbles, they sought it with care; -------- > They pursued it with forks and hope; > They threatened its life with a railway-share; > ----------- They charmed it with smiles and soap." ----------------------- > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: <ex...@ih...> - 2002-07-24 06:08:24
|
On Tue, 23 Jul 2002 23:00:07 -0700 Austin Schutz <te...@of...> wrote: > On Tue, Jul 23, 2002 at 08:14:35AM -0700, ex...@ih... wrote: > > Don't think we're on the same wavelength, I suspect that it's my fault for > > not providing enough info. I do understand "-re", I do not understand why > > "-re" fails and when I don't specify "-re" things are fine. > > > > In my previous post I noted that I was seeing this which > > I only saw when I used $obj->expect(undef, -re => "$item"); > > and this showed up > > Use of uninitialized value in concatenation (.) or string at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1388 > > > > > > If I use this I have no problems: > > $obj->expect(undef, $item); > > > > > > So what's different about the code path for those two that causes one to fail? > > Dunno, what's $item? Also, why the double quotes in "$item"? It's Actually I think I did at one point try $obj->expect(undef, '-re', $item); $item could be like: [yes] or [no] or [/home/efudd] etc., etc. > certainly possible to make illegal regexps that will have unexpected > behaviors. Also putting in double quotes may end up in an extra unexpected > interpolation. Perhaps that's the issue then, an illegal regexp in the form: [somealphastring] the brackets in this case could well be the problem. I'll investigate as soon as I can. > > > > > Essentially that's all the code there is, it waits for a string which is a "key" > > value and provides the corresponding "value" value. It almost appears as if the > > -re idiom is not respecting the undef for the timeout value and therefore is > > not waiting indefinitely. > > > > That would definitely not be proper behavior. > > Austin > |
From: Austin S. <te...@of...> - 2002-07-24 06:00:50
|
On Tue, Jul 23, 2002 at 08:14:35AM -0700, ex...@ih... wrote: > Don't think we're on the same wavelength, I suspect that it's my fault for > not providing enough info. I do understand "-re", I do not understand why > "-re" fails and when I don't specify "-re" things are fine. > > In my previous post I noted that I was seeing this which > I only saw when I used $obj->expect(undef, -re => "$item"); > and this showed up > Use of uninitialized value in concatenation (.) or string at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1388 > > > If I use this I have no problems: > $obj->expect(undef, $item); > > > So what's different about the code path for those two that causes one to fail? Dunno, what's $item? Also, why the double quotes in "$item"? It's certainly possible to make illegal regexps that will have unexpected behaviors. Also putting in double quotes may end up in an extra unexpected interpolation. > > Essentially that's all the code there is, it waits for a string which is a "key" > value and provides the corresponding "value" value. It almost appears as if the > -re idiom is not respecting the undef for the timeout value and therefore is > not waiting indefinitely. > That would definitely not be proper behavior. Austin |
From: Stephen <S.J...@du...> - 2002-07-23 16:07:45
|
It seems to me that the only problem here is that you are using the key, value pair system like a hash. When i want to do a regexp match i always do something like: $obj->expect(undef,'-re',$item); this works for me. I'm not sure it's intended to work with the => is it? Stephen >In my previous post I noted that I was seeing this which >I only saw when I used $obj->expect(undef, -re => "$item"); >and this showed up >Use of uninitialized value in concatenation (.) or string at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1388 > > >If I use this I have no problems: >$obj->expect(undef, $item); > > >So what's different about the code path for those two that causes one to fail? > >Essentially that's all the code there is, it waits for a string which is >a "key" value and provides the corresponding "value" value. It almost >appears as if the -re idiom is not respecting the undef for the timeout >value and therefore is not waiting indefinitely. -------- "They sought it with thimbles, they sought it with care; -------- They pursued it with forks and hope; They threatened its life with a railway-share; ----------- They charmed it with smiles and soap." ----------------------- |