I think you have to put a "\" in front of the "^" in order for the substitution to recognize it as a literal character. Your statement is saying to replace the beginning of the filename with a space. It should be: $a=s/\^/_/g;
HTH, Joyce ----- Original Message ----- From: "siren jones" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 04, 2002 4:36 PM Subject: s/// Question from Newbie > > I'm trying to replace the ^ in a filename, which by the way, I did not > create. > > Here is the filename: Wind19^144^0.0^100^.grib > > Here is my test code: > > $a = "144^0.0^100^"; > $a = s/^/_/g; # replace ^ with underscore character for ftp > print "$a,"\n"; > exit; > > Here is what gets printed: > > 144^0.0^100^ > > > What am I doing wrong with the substitution operator? Thanks in advance. > > > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]