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);
--- Begin Message ---
Hi,
>Any help greatly appreciated.
Beau and Paul have given the help you sought.
Help was actually at your finger tips viz, the Perl online documentation.
In your case, you would issue a command like:
perldoc -f push
and you get the display:
--
pu
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
nt: Wednesday, November 13, 2002 11:29 PM
To: [EMAIL PROTECTED]
Subject: push'ing items onto an array
Hi all,
I have written a program (listed at the end of this email) which is
designed to examine the arguments to the program and sort them into .C
files and .H files and then print them out
Hi all,
I have written a program (listed at the end of this email) which is
designed to examine the arguments to the program and sort them into .C
files and .H files and then print them out together. It (attempts) to
do this by adding each .C file or .H file into an array @c_files or
@h_files