You could have used '^' operator , I suppose ':\
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Eddy
Tan
Sent: Friday, December 03, 2004 9:20 AM
To: [EMAIL PROTECTED]
Subject: Printing dollar ($) sign from command line
I wonder if someone could help me with this simple script.
# doh.pl
$ARGV[0] =~ s/\$/\\\$/;
print "You got: $ARGV[0]";
Then run the script:
doh.pl $321
You got: 21 --> Im expecting to get $321
How do I fix it?
Ta.
__________________________________
Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.
http://celebrity.mail.yahoo.com
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs