- or download this
# hostname 123
hostname 123
...
..
ifconifg vif5-9 some data here
- or download this
$/ = undef;
while ( <DATA> )
{
@col=split('#',$_);
$/ = \n;
- or download this
foreach (@col) {
print "This is element : $i\n";
...
}
if (/ifconfig/) {
print "found an ifconfig line\n";
- or download this
Hostname : hostname123
# of vlans: 8
...
Hostname : hostname456
# of vlans: 9
# of ifconfig lines: 9