Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
If I run this in an xterm specifying the data's filename as an argument, the script runs & terminates the xterm. When I run this script at the console it runs to completion as expected; my debugger knowledge is weak, but it appears to run fine there too. What should I be looking for in the debugger in order to determine the root cause? Thanks for any insight which can be shared.#!/usr/bin/perl -w use strict; use warnings; eval { die 'insufficient arguments' unless @ARGV; open(IN, $ARGV[0]) or die "unable to open '$ARGV[0]'"; while (<IN>) { printf "%4d:\t%s", $., $_; } close IN; }; if ($@) { print "error:\t$@"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: debugging possible memory crash?
by varian (Chaplain) on Jun 11, 2007 at 06:40 UTC | |
by Anonymous Monk on Jun 11, 2007 at 06:45 UTC | |
by Anonymous Monk on Jun 11, 2007 at 09:00 UTC | |
|
Re: debugging possible memory crash?
by cdarke (Prior) on Jun 11, 2007 at 08:30 UTC | |
by derby (Abbot) on Jun 11, 2007 at 14:21 UTC | |
by Anonymous Monk on Jun 11, 2007 at 14:56 UTC | |
by cdarke (Prior) on Jun 11, 2007 at 15:29 UTC | |
|
Re: debugging possible memory crash?
by TOD (Friar) on Jun 11, 2007 at 05:53 UTC |