#!/bin/env perl open(SYSLOG, "/tmp/log100lines") or die "Can't open file: $!\n"; foreach $line (<SYSLOG>) { chomp $line; @string = join(',', split(/ /, $line)); print "$string[4]\n"; }
In reply to reading the 5th element from file doesn't work. by singho
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |