Re: Help with $_

2009-10-27 Thread Michael Ellery
I would recommend either (1) don't chomp in the first place or (2) just do print "$_\n". -Mike Barry Brevik wrote: > I am aware that there are a number of Perl "operations" that will use > the system variable $_ as the default variable if one is not supplied. > > Consider the following snippet (

Help with $_

2009-10-27 Thread Barry Brevik
I am aware that there are a number of Perl "operations" that will use the system variable $_ as the default variable if one is not supplied. Consider the following snippet (where XMLIN is a previously opened file handle): foreach () { chomp; # Do some stuff to the contents of the l