tehjord has asked for the wisdom of the Perl Monks concerning the following question:
THX FOR THE REPLIES ! works !use strict; my %h = (a1 => 1); my $test = "a1 to a2"; if ($test =~ /([a-hA-H][1-8]\s*)to(\s*[a-hA-H][1-8])/) { print "test work\n"; } print $h{$1}; #print nothing print $h{a1}; #print 1 print $1; #print "a1"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Weird hash access problem
by toolic (Bishop) on May 26, 2011 at 18:31 UTC | |
|
Re: Weird hash access problem
by wind (Priest) on May 26, 2011 at 18:30 UTC | |
|
Re: Weird hash access problem
by kennethk (Abbot) on May 26, 2011 at 18:30 UTC | |
|
Re: Weird hash access problem
by ikegami (Patriarch) on May 26, 2011 at 18:32 UTC | |
|
Re: Weird hash access problem
by jfroebe (Parson) on May 26, 2011 at 18:32 UTC | |
by ikegami (Patriarch) on May 26, 2011 at 18:33 UTC | |
by jfroebe (Parson) on May 26, 2011 at 19:07 UTC |