[sf-perl] Hanging with the diamond operator?

Richard Reina gatorreina at gmail.com
Tue Jan 8 12:58:21 PST 2008


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\[/);

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.

This is turning out to be a disruptive problem here.  Any help would
be greatly appreciated.


#!/usr/bin/perl5 -w

use warnings;
use strict;

sub delimit {

my ($tos, $ccs, $rp, $sb, $body, $in_file) = @_;

if (defined $in_file) { # file submited

@ARGV = $in_file;

$body = "";

while(<>) {

push(@lines, $_) unless (/espf\[/);  # hangs here sometimes

} # end of while

} # end of if

} # end of sub


More information about the SanFrancisco-pm mailing list