sweetblood has asked for the wisdom of the Perl Monks concerning the following question:
Format STDOUT redefined at ...
This happens even if the functions are not called.
I've done some looking around to find the answer. I read the perldoc perlform but it didn't quite sink in. Apparently my head is more dense than the perldoc. I'm guessing I need to use select somehow, but I just can't figure it out.
The script and even these functions are quite long so I'll include something I just dummied up that produces the same error:
#!/usr/bin/perl -w use strict; my $foo = "FOO"; my $bar = "BAR"; my $foobar = "FOOBAR"; sub foo { format STDOUT = FOO BAR @<<<<<<< @<<<<<<< $foo, $bar . write; } sub foobar { format STDOUT = FOOBAR BAR @<<<<< @<<<<<<< $foobar, $bar . write; } foo() if ($ARGV[0] =~ /^foo$/i); foobar() if ($ARGV[0] =~ /^foobar$/i);
I know this example isn't pretty but I just slammed it together.
TIA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "Format STDOUT redefined"
by Roy Johnson (Monsignor) on Dec 12, 2003 at 17:43 UTC | |
|
Re: "Format STDOUT redefined"
by Paladin (Vicar) on Dec 12, 2003 at 17:40 UTC | |
|
Re: "Format STDOUT redefined"
by ysth (Canon) on Dec 12, 2003 at 18:33 UTC |