Try this: @temp = split('\#', "abc#def#ghi#jkl") ; foreach (@temp){ print "\n", $_; }
Josimar ----- Original Message ----- From: "Perl" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 14, 2003 3:16 AM Subject: Split question > Hi, > i am new to Perl. > here is my question .... > > i have a character string like abc#def#ghi#jkl > > i want to split the string based on the delimiter # so that i get > something like this : > > abc def ghi jkl > > But > > @temp = split(/#/, "abc#def#ghi#jkl") ; > > doesn't seem to work. > > am i doing anything wrong here ? > > thanks, > S. > > > > > > --------------------------------- > Do you Yahoo!? > New Yahoo! Photos - easier uploading and sharing -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>