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 wrote: > $_ = " 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 literal as

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" 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, $dud2, $w_play

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 wrote: > 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 $w_player = "?"; my $

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 H