[sf-perl] Hanging with the diamond operator?

Quinn Weaver quinn at fairpath.com
Tue Jan 8 14:01:01 PST 2008

On Tue, Jan 08, 2008 at 02:58:21PM -0600, Richard Reina wrote:
> The script below is called from another perl script that runs on linux
> console on a few machines here.  The problem is that sometimes the
> script hangs.
> I believe this script is hanging at the line push(@lines, $_) unless (/espf\[/);

Could this be a problem with the low-level activity of reading the file?
Are you reading this file off of a network file system of some sort?
<> will hang until it reaches a newline or EOF.

> I believe this because in cases when it hangs, if I do a Cntl-C I get:
> Not a subroutine reference at ./file_delimiter.pl line 24, <> line3.

I'm not sure where this is coming from.  At first I thought perhaps you
had done something like

    $SIG{INT} = \&no_such_sub;

but on my Perl (v5.8.8) that gives a different error:

    SIGINT handler "no_such_sub" not defined.

That said, I wouldn't worry about it too much.  I think it's an artifact
of your doing Ctrl-C, not a problem you'll encounter in Real Life.

Quinn Weaver, independent contractor  |  President, San Francisco Perl Mongers
http://fairpath.com/quinn/resume/     |  http://sf.pm.org/

More information about the SanFrancisco-pm mailing list