N
neilsolent
Hi
I get a warning message "Use of uninitialized value $3 in hash element
at test.pl line 13." when I run the code below (using Perl 5.10). How
I can fix this in a neat way ?
Thanks for any help !
I get a warning message "Use of uninitialized value $3 in hash element
at test.pl line 13." when I run the code below (using Perl 5.10). How
I can fix this in a neat way ?
Thanks for any help !
Code:
!/usr/bin/perl -w
use strict;
my %fs;
my @df;
$df[0] = "udev 125320 152 125168 1% /dev";
foreach (@df)
{
if (/\d+\s+\d+\s+(\d+)\s+(\d+)\%\s+(?!\/cdrom)/)
{
$fs{$3} = 1;
}
}