Re: perl one liner to remove all but the base file name




[ 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
.



Relevant Pages

  • Re: Cross-frame location.reload()
    ... If you want to post a followup via groups.google.com, ... When most decent newsreaders quote a post, it will strip off a delimited signature starting with the dash dash space. ...
    (comp.lang.javascript)
  • Re: Acol sequence
    ... If you want to post a followup via groups.google.com or any other ... Google is only an interface to Usenet; ... If you want us to quote everything that went before that is totally unreasonable and not good. ...
    (rec.games.bridge)
  • Re: struct and typedef problems
    ... >> So u have to include the other file into this file and declare the ... >> structure in the other file with extern keyword. ... > Please provide some context when posting a followup. ... > quote the entire article, just enough to make it possible to ...
    (comp.lang.c)
  • Re: struct and typedef problems
    ... >> So u have to include the other file into this file and declare the ... >> structure in the other file with extern keyword. ... > Please provide some context when posting a followup. ... > quote the entire article, just enough to make it possible to ...
    (comp.lang.c)
  • Re: Permissions to Run StartService/StopService from Web Interface? (Win32::Service)
    ... please quote some context in replies! ... If you want to post a followup via groups.google.com, ...
    (comp.lang.perl.misc)