Re: push'ing items onto an array

2002-11-14 Thread David Buddrige
Thanks Paul, Beau, That's got it. 8-) I knew it had to be something simple. 8-) David. Paul Johnson wrote: 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);

Re: push'ing items onto an array

2002-11-14 Thread Paul Johnson
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

RE: push'ing items onto an array

2002-11-14 Thread Beau E. Cox
Hi - My guesses (untested): @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); + push @h_files, $arg; } } Function pus