Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
hi there, I want to understand what this code snippet is doing exactly. I have an idea, but I might be missing something.
open F, "cat file | /usr/bin/mycommand"; my $def_slash = $/; $/ = ""; eval <F>; $/ = $def_slash; close F;
Sorry that I can't post the command itself, maybe that's important in this case:(. My goal to catch any error returned from this command, but $@ does not catch anything after the eval :( Could you please advise? Thanks much
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Undestanding this code snippet
by moritz (Cardinal) on Jul 21, 2008 at 09:45 UTC | |
|
Re: Undestanding this code snippet
by shmem (Chancellor) on Jul 21, 2008 at 10:17 UTC | |
by Anonymous Monk on Jul 21, 2008 at 16:37 UTC | |
by shmem (Chancellor) on Jul 21, 2008 at 20:17 UTC | |
|
Re: Undestanding this code snippet
by FunkyMonk (Bishop) on Jul 21, 2008 at 09:56 UTC | |
|
Re: Undestanding this code snippet
by svenXY (Deacon) on Jul 21, 2008 at 09:55 UTC | |
|
Re: Undestanding this code snippet
by LesleyB (Friar) on Jul 21, 2008 at 10:43 UTC |