in reply to Using a user input array with File::Find

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 :-))

Replies are listed 'Best First'.
Re^2: Using a user input array with File::Find
by xjlittle (Beadle) on Jun 28, 2009 at 01:42 UTC
    Ahh ok. I didn't know I could use split like that (I don't get to do enough perl!). I originally tried using a foreach loop with the array created by the input from the user. The split worked really well. Thank you!