Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I think that there might be a problem with that. It might work, but I would suggest cleaning up one line a bit. Instead of:
if (s/(\w+shar\d\d\d\d\d\d\.\d\d\d\d)/$1/)

I would suggest:

if (m/(\w+shar\d\d\d\d\d\d\.\d\d\d\d)/)
What you are doing with s/// is substituting your regular expression for $1. The parenthesis around the expression delimit(?) $1. So it would appear that you are substituting the regular expression for itself. Then of course setting your variable $file to be equal to $1. Note the m/// in the second if statement. Also, your regular expresion could match on more than one file that fit that pattern if several files fit that scheme.


"Ex libris un peut de tout"

In reply to Re: Re: Re: Net::FTP by nimdokk
in thread Net::FTP's get() does not handle wildcards by nairod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-19 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found