Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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


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]
[choroba]: erix: I'm proud to be from a nation that also does one thing well
[LanX]: ah yes! And he called her Kit and she could talk while a light was going from her left to right eye and back...
[erix]: choroba: pretty impressive! :)
LanX imagines which nations would be dominating if the winter olympics were invented in East Asia
[LanX]: Corion: and that's the clue how Germany can dominate Handball tournaments, just continuing the domestic league and forbidding the best players of the world to attend :)
LanX (which would be a good scheme for England and football too)
[LanX]: If "Canada will play the Czech Republic for bronze on Saturday", that means Germany will play Syria in disguise...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2018-02-23 16:38 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (303 votes). Check out past polls.