Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: M3U Playlist Generatorby Anonymous Monk |
on Jul 01, 2012 at 21:28 UTC ( [id://979330]=note: print w/replies, xml ) | Need Help?? |
Below is my rewritten version which does not depend on File::Find Why? Comments welcome. $inpath can be file ( use -f or -d inestead of -e, since both -f and -d imply -exist ) $inpath could contain glob metacharacters I'm personally not a fan of interactive commands, exit program if file already exists and overwrite not forced ( Getopt::Long ), $inpath could contain glob metacharacters if you don't want to recurse, you could write
FWIW, if you need to do path manipulations, Path::Class::Rule is better than File::Find::Rule; 3 argument open is better than two, "or" is better than "||" since it doesn't require extra parens
In Section
Code Catacombs
|
|