Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: String Newline Question

by Parham (Friar)
on Mar 24, 2002 at 16:46 UTC ( #153903=note: print w/replies, xml ) Need Help??

in reply to String Newline Question

it wasn't part of the real question, nonetheless it's another good point:

if you had a string:

$string = "something\n0999\nsomething\n";

and you matched against it ending with 999 with the /m option, it would also work. For example using this regex would yield a pass for the regex:

if ($string =~ /999$/m) { print "pass"; }

/m just treats the $string as a multi-line string and if it finds 999 at the end of any line in $string (remember $ means before the newline) then the regex would still work. I thought i'd just throw that in cuz it was useful :).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://153903]
hippo sprays downvotes in the general direction of the Anonytroll.
LanX wipes his face dry
NodeReaper passes a mop

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2018-03-21 13:42 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (267 votes). Check out past polls.