Assuming white space separated user input, what's wrong with using
split to auto-split the user input, giving:
while (<STDIN>){
File::Find::find({wanted => \&wanted}, split);
exit;
}
??
Is it just me or am I missing something (coz it's stupid o'clock here) ?? Coz it strikes me that exit in the loop is preventing you reaching your goal since even if the user entered a number of paths, the exit would cause the loop (and indeed the program) to terminate once the first (set of) path(s) has been processed - remove the exit and get the user to just enter <CTRL><D> to end the list and thus the program.
A user level that continues to overstate my experience :-))
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.