Rob Dixon wrote:
> 
> John W. Krahn wrote:
> >
> > So, you are saying that:
> >
> >     split ' ';
> >
> > Is the same as:
> >
> >     split m' ';
> >
> > And the same as:
> >
> >     split / /;
> 
> The second and third are the same. The first one, a
> single space, is a special case. It splits on whitespace the
> same as:
> 
>     split;
> 
> and
> 
>     split '\s+';
      ^^^^^^^^^^^
That is most definitely _not_ the same.  :-)


$ perl -e'
$_ = "   one   two   ";
print ">$_< " for split;       print "\n";
print ">$_< " for split " ";   print "\n";
print ">$_< " for split /\s+/; print "\n";
'
>one< >two< 
>one< >two< 
>< >one< >two< 



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to