perl.beginners
[Top] [All Lists]

Re: a match question

Subject: Re: a match question
From: John W. Krahn
Date: Tue, 24 Nov 2009 18:51:07 -0800
Newsgroups: perl.beginners


Shawn H Corey wrote:

Also:
$ perl -le '$_="aXXXb"; @captured = $_ =~ m{ (X*) }gmsx;print "captured:
<", join( ">, <",@captured), ">"'
captured: <>, <XXX>, <>, <>

@captured = $_ =~ m{ (X*) }gmsx;

Is usually written as:

@captured = /X*/g;




John
--
The programmer is fighting against the two most
destructive forces in the universe: entropy and
human stupidity.               -- Damian Conway

<Prev in Thread] Current Thread [Next in Thread>