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);
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
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