When I type in the following code does only one line from the file I open go into the $scalar, and the regular expression i've used allows numbers thru, Y and how do I fix it?? PLEASE HELP
#!/usr/bin/perl
open(CUST, "c:/customers.txt" || die "cannot open customers.txt\n";
$cust=<CUST>;
chomp $cust;
@cust=split(/ /, $cust);
@names=grep m![A-Za-z][^@][^\d]!, @cust;
print "$cust";
#!/usr/bin/perl
open(CUST, "c:/customers.txt" || die "cannot open customers.txt\n";
$cust=<CUST>;
chomp $cust;
@cust=split(/ /, $cust);
@names=grep m![A-Za-z][^@][^\d]!, @cust;
print "$cust";