Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: trim header lines in files

by choroba (Canon)
on Aug 05, 2013 at 13:09 UTC ( #1047908=note: print w/ replies, xml ) Need Help??

in reply to trim header lines in files

The pipe character is not whitespace. You can mention it in the regex, you even do not have to backslash it, because it appears in a character class:

while (<>) { if (/^(>[^|]*)/) { print "$1\n"; } else { print; } }
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Comment on Re: trim header lines in files
Download Code

Log In?

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

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 2015-03-04 14:00 GMT
Find Nodes?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:

    Results (112 votes), past polls