Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: meaning of if ($file !~ /\.tar(\.gz)?$/)

by hdb (Monsignor)
on Apr 08, 2013 at 15:47 UTC ( #1027541=note: print w/replies, xml ) Need Help??


in reply to meaning of if ($file !~ /\.tar(\.gz)?$/)

Matches all $file except .tar and .tar.gz endings.

if ( $file !~ # scalar $file tested for not matching /\.tar # an ending of .tar (\.gz)? # followed by an optional .gz $ # at the end of the name /x)

Replies are listed 'Best First'.
Re^2: meaning of if ($file !~ /\.tar(\.gz)?$/)
by filipebean (Novice) on Apr 08, 2013 at 16:17 UTC

    Hi,

    thank you, your answer is clear.

    it was the optional part that confused me :(

    best regards.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027541]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2018-02-24 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (310 votes). Check out past polls.

    Notices?