Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
That produces:#!/usr/bin/perl -w use strict; open (FILEHANDLE, '<', 'some.file') or die "Can't open some.file for r +eading.\n"; <FILEHANDLE>; print; close FILEHANDLE;
What am I not understanding?Use of uninitialized value $_ in print at ./file.pl line 6, <FILEHANDL +E> line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how do I "initialize" $_
by AnomalousMonk (Archbishop) on Oct 11, 2018 at 04:51 UTC | |
by Anonymous Monk on Oct 11, 2018 at 06:46 UTC | |
by Marshall (Canon) on Oct 12, 2018 at 19:47 UTC | |
by haukex (Archbishop) on Oct 13, 2018 at 08:47 UTC | |
by Marshall (Canon) on Nov 01, 2018 at 06:57 UTC | |
by AnomalousMonk (Archbishop) on Oct 13, 2018 at 02:10 UTC | |
by Marshall (Canon) on Oct 13, 2018 at 04:21 UTC | |
| |
|
Re: how do I "initialize" $_
by tybalt89 (Monsignor) on Oct 11, 2018 at 03:22 UTC | |
|
Re: how do I "initialize" $_
by Marshall (Canon) on Oct 11, 2018 at 04:43 UTC | |
|
Re: how do I "initialize" $_
by holli (Abbot) on Oct 11, 2018 at 17:31 UTC |