Oops :)
Wrote some nice perl yesterday though. Andrew wanted a script which recursively searched a directory for mp3 files and put them into a list, so I gave him:
#!/usr/bin/perl
push(@a,"/home/mp3s");while($d=shift@a){opendir(d,$d);while($f=readdir(d)){next
if($f=~/^\.\.?$/);(-d"$d/$f")?push(@a,"$d/$f"):($f!~/\.mp3$/i)?next:push(@f,"$d/
$f");}}open(o,">list");foreach(@f){print o "$_\n"}close(o);Nice :)





Comments
There are currently no comments for this entry.