Re: Modifiers and variables

Jean-Michel Hiver <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.petal
Message-ID <[email protected]>
>Cool, but I have to agree with Jean-Michel that I'd prefer the args not
>be automatically parsed. However, I'm interested in your code that does
>the parsing of the tokens. In the following line, has $TOKEN_RE already
>been defined in Petal or is this coming from Petal::CodePerl?
>
>    my @tokens = $argument =~ /($TOKEN_RE)/gsm;
>
If memory serves, 's' means that '.' also matches carriage returns, 
while 'm' means that ^ and $ match the beginning of string (as opposed 
to line) and the end of string (as opposed to line) respectively. Or 
maybe it's the reverse :-)

I always use both when dealing with multiline string 'cause it works for 
me...

As for $TOKEN_RE, take a look at Petal/Hash/String.pm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.