Hi,
I want to display 'canada', 'cane', 'canine, 'ca.e.02'.
Problem: It only displays 'canada'
#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @xfiles;
@xfiles = ("canada", "cane", "cane02", "ca.e.02", "canine",
".hidden");
foreach $file (@xfiles){
#want canada only for this iteration
icarus wrote:
Hi,
Hello,
I want to display 'canada', 'cane', 'canine, 'ca.e.02'.
Problem: It only displays 'canada'
#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @xfiles;
@xfiles = ("canada", "cane", "cane02", "ca.e.02", "canine",
".hidden");
my @xfiles = ("canada", "cane", "can
hi,
#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @xfiles;
@xfiles = ("canada", "cane", "cane02", "ca.e.02", "canine",
".hidden");
foreach $file (@xfiles){
#want canada only for this iteration
if ($file =~ /(canada)/){print "$file\n - end first if - \n";}
#wb: (expression)
Wolf Blaum wrote:
#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @xfiles;
@xfiles = ("canada", "cane", "cane02", "ca.e.02", "canine",
".hidden");
foreach $file (@xfiles){
#want canada only for this iteration
if ($file =~ /(canada)/){print "$file\n - end first if - \n";}
#w