perl -e 'print "Enter your values as 1,2,3...:";
$_=<>;
chomp;
my @asLine=split (/,/, $_);
foreach (@asLine) {
        print "asLine[".$i++."]=<$_>\n";
        }'

You may want to see what you have 
   print "<$_>\n" 
for example just before you try the split ...

-----Original Message-----
From: Brian Bukeavich [mailto:[EMAIL PROTECTED]]
Sent: June 28, 2001 15:38
To: [EMAIL PROTECTED]
Subject: split function question


I need a little help with the split function. I'm trying to split a line 
based on comma delimeters(,), but when I use the syntax below I don't get 
the results I expect.  What am I doing wrong?  Is there a an special escape 
sequence for a comma?

my @asLine = split (/,/, $_);


Thanks
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to