Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2018-06-18 21:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (110 votes). Check out past polls.

    Notices?