#!/usr/bin/perl
for $test(@ARGV) {
$counter++;
}
if ($counter != 1) {
print "You must enter a file name!\n";
}
if ($counter == 1) {
$flag = 0;
exec `cut -f3 -d":" /export/home/jones/public_html/$ ARGV[0] > "tmplist"`;
open (reader, "tmplist");
while ($line = <reader>) {
$test1 = $line;
if ($flag == 0) {
$test2 = $test1;
} # end if
$flag = 1;
if ($test2 < $test1) {
$test2 = $test1;
} #end if
} # end while
$new = $test2 + 1;
print "The new number is ";
print $new;
print "\n";
} # end if
my $highest = 0;
ASKER
ASKER
ASKER
Perl is a high-level, general-purpose, interpreted, dynamic programming languages with over 25 years of development. Perl 5 runs on over 100 platforms from portables to mainframes and is suitable for both rapid prototyping and large-scale development projects. Perl gained widespread popularity as a Common Gateway Interface (CGI) scripting language, in part due to its regular expression and string parsing abilities. In addition to CGI, Perl is used for graphics programming, system administration, network programming, finance, bioinformatics, and other applications.
TRUSTED BY
ASKER
While testing this with the name test2 - I got this error:
Use of uninitialized value in numeric gt (>) at ./test2 line 18, <$fh> line 1.
I am not sure I understand that