Josimar Nunes De Oliveira wrote: > > From: "Perl" <[EMAIL PROTECTED]> > > > > @temp = split(/#/, "abc#def#ghi#jkl") ; > > > > doesn't seem to work. > > > > am i doing anything wrong here ? > > Try this: > > @temp = split('\#', "abc#def#ghi#jkl") ; > foreach (@temp){ > print "\n", $_; > }
The first argument to split is converted to a regular expression and the '#' character is not special in a regular expression so split/#/ and split'\#' do exactly the same thing. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>