in reply to Matching quoted variables. Cant make it work..
You'll want to read the 'perlre' documentation to see what's going on here.perl -e '$a="MIN.(NERR_VOL2)"; $b="MIN.\(NERR_VOL2\)" ; $x = ( qq/$a/ +=~ qq/$b/ ) ; print "$a == $b ? $x \n" ;'
You're telling perl to create a string, and since it has an expression inside the string, you're telling it to interpolate the value. The end result is that you're asking Perl to do a lot more work to get the result you really want:$b = "$a";
which tells Perl to simply copy the value of $a into $b.$b = $a;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Matching quoted variables. Cant make it work..
by Fletch (Bishop) on Mar 16, 2006 at 05:01 UTC | |
by roboticus (Chancellor) on Mar 17, 2006 at 00:58 UTC | |
by Fletch (Bishop) on Mar 17, 2006 at 01:13 UTC | |
|
Re^2: Matching quoted variables. Cant make it work..
by Melly (Chaplain) on Mar 16, 2006 at 16:44 UTC |