About issue of chomp command
时间:2010-10-22 来源:yu_jiang163
for example:
# cat /tmp/a
a
d
g
f # cat /tmp/b.pl
#!/usr/bin/perl
print "$line\n"; |
resulut:
1
1
1
1
what's the root cause?
#!/usr/bin/perl |
note: The result of chomp can't assign to other variable $line = chomp($_); #return value will be 1