my @fields = qw( serverhostname execdate etc. ); while (<INFILE>) { chomp; my %stuff; @stuff{@fields} = split /\|/; # Easy iteration over fields (e.g. for debugging) print "[$_][$stuff{$_}]\n" for @fields; }
In reply to Re: Re: Re: Re: Re: split and sysread()
by runrig
in thread split and sysread()
by relaxed137
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |