Hi Experts,
I am trying learning perl, and found this issue,
datares :
ExternalNetwork=1,Cell=1234 att 555
ExternalNetwork=1,Cell=5678 att 553
script :
#!/usr/bin/perl
open (FILE, 'checkres');
while (<FILE>) {
chomp;
($name, $fr, $value) = split("\t");
print "Name: $name\n";
print "Attr: $fr\n";
print "Value: $value\n";
print "---------\n";
}
close (FILE);
exit;
but result not as I imagine :
Name: ExternalNetwork=1,Cell=21252 att 555
Attr:
Value:
---------
Name: ExternalNetwork=1,Cell=21472 att 553
Attr:
Value:
---------
Is there something that i missed ? ,
Thx for kind advice.
Greating from beginner'user
Lepi
additional : how about if I want to split again "ExternalNetwork=1,Cell"
I am trying learning perl, and found this issue,
datares :
ExternalNetwork=1,Cell=1234 att 555
ExternalNetwork=1,Cell=5678 att 553
script :
#!/usr/bin/perl
open (FILE, 'checkres');
while (<FILE>) {
chomp;
($name, $fr, $value) = split("\t");
print "Name: $name\n";
print "Attr: $fr\n";
print "Value: $value\n";
print "---------\n";
}
close (FILE);
exit;
but result not as I imagine :
Name: ExternalNetwork=1,Cell=21252 att 555
Attr:
Value:
---------
Name: ExternalNetwork=1,Cell=21472 att 553
Attr:
Value:
---------
Is there something that i missed ? ,
Thx for kind advice.
Greating from beginner'user
Lepi
additional : how about if I want to split again "ExternalNetwork=1,Cell"