develooper Front page | perl.beginners | Postings from April 2002

Re: Creating variables of a string

Thread Previous | Thread Next
From:
John W. Krahn
Date:
April 2, 2002 12:55
Subject:
Re: Creating variables of a string
Message ID:
3CAA1A7C.FFC1A622@acm.org
Nikola Janceski wrote:
> 
> That always confused me, by default split splits by /\s+/ so why confuse us
> more by making " " and ' ' magical.

No, the default is NOT /\s+/, the following are all equivalent:

@words = split;
@words = split ' ';
@words = split ' ', $_;


John
-- 
use Perl;
program
fulfillment

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About