Do you know where your variables are? | |
PerlMonks |
Re: Remove from character to end of lineby aufrank (Pilgrim) |
on Aug 01, 2002 at 16:57 UTC ( [id://186842]=note: print w/replies, xml ) | Need Help?? |
I would probably try a pattern like
which matches at least one forward slash and then any characters after it. note that perlstyle recommends that you not use a forward slash as the delimiter for any substitution or match involving slashes, but I don't know if that works from the command line, so use whatever delimiter is most friendly with your shell. I'm sure some regex guru will be along soon to provide a better answer, but this gets the job done at least (I think). hth --au
In Section
Seekers of Perl Wisdom
|
|