in reply to Re^4: Help with fstab
in thread Help with fstab
If I recall correctly, /etc/fstab uses whitespace to delimit the fields, so you should be able to do something like:
open FILE, '<', "/mnt/etc/fstab"; my @lines = <FILE>; for (@lines) { my @fields = split /\s+/, $_; print "First column: $fields[0], Third column: $fields[2].\n"; }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Help with fstab
by Dorficus (Initiate) on Jan 20, 2012 at 13:18 UTC | |
by choroba (Cardinal) on Jan 20, 2012 at 14:40 UTC | |
by Dorficus (Initiate) on Jan 23, 2012 at 08:41 UTC |
In Section
Seekers of Perl Wisdom