Re: perl one liner to remove all but the base file name
- From: Tad McClellan <tadmc@xxxxxxxxxxxxxx>
- Date: Sat, 3 Feb 2007 08:59:29 -0600
[ Please find out how to compose a followup by trimming what you quote.
If you want to comment on one line, then quote only that one
line, not 25 lines.
Please do not quote .sigs.
]
Oxnard <oxnard@xxxxxxxxxxxxxxx> wrote:
"Abigail" <abigail@xxxxxxxxxx> wrote in message
news:slrnes536r.ekq.abigail@xxxxxxxxxxxxxxxxxxxxxxx
s !.*/!!;
What does the !! do ... I cannot find a reference to it.
It is the REPLACEMENT part of the s/PATTERN/REPLACEMENT/ operator,
but using an exclamation point (!) as the demiter instead of slash (/).
Abigail's code above is equivalent to:
s/.*\///;
but easier to read and understand because don't have to mentally
filter-out the backslash.
--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.
- References:
- perl one liner to remove all but the base file name
- From: Oxnard
- Re: perl one liner to remove all but the base file name
- From: Abigail
- Re: perl one liner to remove all but the base file name
- From: Oxnard
- perl one liner to remove all but the base file name
- Prev by Date: Re: sort a text file
- Next by Date: Re: Problems dealing with dates in Windows
- Previous by thread: Re: perl one liner to remove all but the base file name
- Next by thread: Re: perl one liner to remove all but the base file name
- Index(es):
Relevant Pages
|