while (<>) { #line1
print; #line2
}
> But so that I could add some better control of this program, can anyone
please tell me what the ACTUAL VARIABLE name is that is being internally
used in ?<>? (line 1)?
> And what ACTUAL VARIABLE name is being internally used in ?print;? (line
2).
One and the same - the 'heart' of Perl's special vars: $_
while (<>) {
is really
while ( $_ = <> ) {
and (try perldoc -f print) print's default var is $_;
> I would like to modify the above program so that it will run with
variable names that can be seen, as a learning exercise?
while (my $line = <> ) {
a
-------------------
Andy Bach
Systems Mangler
Internet: [email protected]
Voice: (608) 261-5738; Cell: (608) 658-1890
Entropy just ain't what it used to be_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs