David Buddrige said: > #!/usr/bin/perl
use strict; use warnings; > @c_files; > @h_files; > > foreach $arg ( @ARGV ) > { > if ( $arg =~ /\w\.[Cc]/ ) > { > push @c_files ($arg); push @c_files, $arg; > } > if ( $arg =~ /\w\.[hH]/ ) > { > push @h_files ($arg); > } > } > > foreach $c_file ( @c_filse ) c_files > { > print "C file : $c_file \n"; > } > > foreach $h_file ( @h_files ) > { > print "H file : $h_file \n"; > } The arguments to push are separated by commas. Using strict and warnings will help you ensure your program is correct, and in your case will require minor changes to the program. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]