in reply to Escaping a variable
my $foo = "4D"; my $bar = "\x4D"; print $bar . "\n";
Doesn't produce
Illegal hexadecimal digit '$' ignored at roman.pl line 10. 4D.
Why don't you please edit your post and include the actual code that is giving you that error message? I suspect I know what it looks like, but it's your job to actually show code that exhibits the problem you're describing.
At any rate, hex will, given the string contained in $foo as a parameter, return the base ten integer value 77.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Escaping a variable
by Draxter (Initiate) on Nov 08, 2011 at 09:19 UTC | |
by davido (Cardinal) on Nov 08, 2011 at 09:23 UTC | |
by Draxter (Initiate) on Nov 08, 2011 at 09:35 UTC | |
by davido (Cardinal) on Nov 08, 2011 at 09:40 UTC | |
by moritz (Cardinal) on Nov 08, 2011 at 09:24 UTC | |
by Draxter (Initiate) on Nov 08, 2011 at 09:26 UTC | |
by davido (Cardinal) on Nov 08, 2011 at 09:27 UTC |