Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Match the starting \>

by Crian (Chaplain)
on May 15, 2009 at 08:47 UTC ( #764215=note: print w/ replies, xml ) Need Help??

in reply to Match the starting \>

You do not have to test the appearance of < and > bevor deleting them.

if (/</) { s/<//; }

does nothing different to


Comment on Re: Match the starting \>
Select or Download Code
Replies are listed 'Best First'.
Re^2: Match the starting \>
by almut (Canon) on May 15, 2009 at 09:42 UTC
    ...does nothing different

    it could do something different, though, if you stick more closely to what the original code was:

    if (/</) { s/^<\s//; # remove "< " at beginning of line # something with lines that do/did contain a '<' anywhere }

    (not sure whether that is what the OP intended, though...)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://764215]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2015-11-28 13:07 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (741 votes), past polls