X
xlue897
Hi,
I have a query to search the max number in a large size file. When I
use the perl code below, it generates error : Out of memory! Bus
error.
Perl Code:
perl -e '
for(<>)
{if ($_>$max){$max=$_;}}
print $max;'
<large_size_file
Also, can command line perl with -n run like awk -
'BEGIN{code}
{code}
END{code}
'
Thanks
Steven
I have a query to search the max number in a large size file. When I
use the perl code below, it generates error : Out of memory! Bus
error.
Perl Code:
perl -e '
for(<>)
{if ($_>$max){$max=$_;}}
print $max;'
<large_size_file
Also, can command line perl with -n run like awk -
'BEGIN{code}
{code}
END{code}
'
Thanks
Steven