#!/usr/bin/perl -w
use strict;
=pod
Maybe somthing like this
is what you want
=cut
open IN, "$ARGV[0]" or die "Damn $ARGV[0]: $!";
while (){
chomp;
my @stats = split /\|/, $_;
print "@stats\n" if $stats[2] and $stats[2] =~ /^\d+$/ and
$stats[2] > 300;
}
close IN or die "Doh $!";
#
Hi,
sorry that print statement should read:
"print "$payroll[1] $payroll[0]\n";
regards, aim
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Dear Mr Jackson,
I am no perl expert, and I am sure other perl people will come up with
another way- as there always is with perl, but it seems this print
statement should do the trick (untested):
"print "$payroll [1] $payroll [0]\n";
brady
brady jacksan wrote:
> HI all,
>
> I am doing an assignment. I am writing a script to access a file and
> print the first and last name of workers whose hours worked exceeded
> 300hours. In the file, the last name is the first field and the first name
> is the second field. Both fields are separa
HI all,I am doing an assignment. I am writing a script to access a file and print the first and last name of workers whose hours worked exceeded 300hours. In the file, the last name is the first field and the first name is the second field. Both fields are separated by the "|" operator.#!/usr/bin/