Welcome to our little family. You'll find that at times we can be a grumpy
sort but that most are happy to help. However, we'd usually rather to "teach
you to fish and feed you for life" rather than to simply "give you a fish
and feed you for a day." With that in mind, here are many of the function
equivilents for you to look into and you can work out the details.

-Pete

P.S. O'Reilly's Learning Perl (Llama book) is also an excellent place to
start.


foreach or for & glob
> for i in *.txt


split
> cut -d"," -f2,3 $i > $i.cut


s///g;
> # Substitute '^,' by 'NaN,"
> sed -e 's/^,/NaN,/g' -e 's/NaN,$/NaN,NaN/g' $i.cut > $i.nan
> # Subtitute ',' by 'Tab(\t)'
> sed -e 's/,/ /g' $i.nan > $i.tab


rename
> # Rename files
> mv $i.tab $i.asc



unlink
> # Delete temporary files
> rm *.cut
> rm *.nan


readdir
> ls *.asc *.txt


you'll have to write a subroutine for wc where you'll open each file, split
each line and count the words.
> wc -l *.asc
> 
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to