Re[2]: Where's this documented?

2014-03-19 Thread Yonghua Peng
From perldoc -f stat: If stat is passed the special filehandle consisting of an underline, no stat is done, but the current contents of the stat structure from the last stat, lstat, or filetest are returned. Example: if (-x $file (($d) = stat(_)) $d 0) { print $file is executable NFS

Re: Re[2]: Where's this documented?

2014-03-19 Thread shawn wilson
On Wed, Mar 19, 2014 at 4:21 AM, Yonghua Peng sys...@mail2000.us wrote: From perldoc -f stat: If stat is passed the special filehandle consisting of an underline, no stat is done, but the current contents of the stat structure from the last stat, lstat, or filetest are returned. Example:

Re: Re[2]: Where's this documented?

2014-03-19 Thread Brian Fraser
On Wed, Mar 19, 2014 at 10:37 AM, shawn wilson ag4ve...@gmail.com wrote: On Wed, Mar 19, 2014 at 4:21 AM, Yonghua Peng sys...@mail2000.us wrote: From perldoc -f stat: If stat is passed the special filehandle consisting of an underline, no stat is done, but the current contents of the

Match Variables Not Working in m//

2014-03-19 Thread Thomas H. George
Here is the code that is not working #!/usr/bin/perl use diagnostics; use strict; ... my $dud1 = dud1; my $dud2 = dud2; my $w_player = ?; my $n_player = ?; my $e_player = ?; my $s_player = ?; # $_ = $Board_1[3]; $_ = H K53deloresg Bills Hank99

Re: Match Variables Not Working in m//

2014-03-19 Thread Andy Bach
On Wed, Mar 19, 2014 at 1:49 PM, Thomas H. George li...@tomgeorge.infowrote: Here is the code that is not working The code you sent was missing an 's' in the RE. It also has no print stmt - trying: #!/usr/bin/perl use diagnostics; use strict; #... my $dud1 = dud1; my $dud2 = dud2; my

Re: Match Variables Not Working in m//

2014-03-19 Thread Shawn H Corey
On Wed, 19 Mar 2014 14:49:32 -0400 Thomas H. George li...@tomgeorge.info wrote: if (/\s*(\w+)\s*(\w+)\*(\w+)\s*(\w+)\s*(\w+)\s*(\w+)/i) { $dud1 = $1; $dud2 = $2; $w_player = $3; $n_player = $4; $e_player = $5; $s_player = $6; } How about: ( $dud1,

Re: Match Variables Not Working in m//

2014-03-19 Thread Robert Wohlfarth
On Wed, Mar 19, 2014 at 1:49 PM, Thomas H. George li...@tomgeorge.infowrote: $_ = H K53deloresg Bills Hank99 Pellinor; if (/\s*(\w+)\s*(\w+)\*(\w+)\s*(\w+)\s*(\w+)\s*(\w+)/i) { This pattern is missing the \s after the second (\w+). The \* matches a