Melly has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have a problem best illustrated with the following short (and 'orrible) script:
#test.dat has one line: bell:\007 open(IN, "test.dat"); while(<IN>){ /(.*):(.*)/; $test{$1} = $2; } print $test{bell} . "no bell\n" $test{bell} = "\007"; print $test{bell} . "bell\n";
For the life of me, I can't seem to get the value read from the file to do anything but send the string "\007" to STDOUT, although the second attempt works fine. Any ideas?
Tom Melly, tom@tomandlu.co.uk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: reading octal values from file
by Abigail-II (Bishop) on Feb 27, 2003 at 16:44 UTC | |
by Melly (Chaplain) on Feb 27, 2003 at 17:16 UTC | |
by flounder99 (Friar) on Feb 27, 2003 at 17:27 UTC |