@list=<compplte_file_list); @msg_list= grep /*.msg$/ , @list; $count-@msg_list;
On Fri, 5 Apr 2002, Sudarsan Raghavan wrote: > Schelstraete Bart wrote: > > > (sorry, my previous message was signed, which can give some problems) > > > > Hello, > > > > Can somebody tell me if it's possible: > > a) to count all the files in a directory , with extension 'msg' with perl > > Check out the glob operator of perl (perldoc -f glob or perldoc > File::Glob) > perl -e 'print while (<*.msg>)' > > > > > b) Can perl calculate the total size of those files? > > Check out the -s operator (perldoc -f -x) > > HTH, > Sudarsan > > > > > > > rgrds, > > > > Bart > > > > -- > > Schelstraete Bart > > Unix/Netscape Administrator > > [EMAIL PROTECTED] > > > > * 'Linux is obsolete' * > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]