An Unintended Recursion

Celejar <[email protected]>
Newsgroups gmane.linux.debian.curiosa
Message-ID <[email protected]>
I was writing a simple scratch script that did little more than just
invoke a command passed to it on the command line, and read its
output.  To my consternation, whenever it ran, system load spiked to
100% and remained there indefinitely.  I soon realized my mistake; I
had written something like 

open(my $fh, "$0 |")

rather than

open(my $fh, "$ARGV[0] |")

...

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.