Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Splitting a string in Perl

by gamache (Friar)
on Apr 25, 2008 at 20:32 UTC ( [id://682909] : note . print w/replies, xml ) Need Help??


in reply to Splitting a string in Perl

my ($memAddr, $data, $ascii) = split /\s{2,}/, $line; # split line at + 2+ spaces $data =~ s/ //g; # remove whitespace from $data chomp $ascii; # remove EOL from $ascii

Replies are listed 'Best First'.
Re^2: Splitting a string in Perl
by gzayzay (Sexton) on Apr 25, 2008 at 20:48 UTC
    Thanks, your're my hero.. It works exactly as I wanted it