in reply to Re: Hash Pipe Problem
in thread Hash Pipe Problem

Thanks, that works, but I'm still cornfused why the original version didn't work. I'm new to Deparse so I don't know what it is telling me.

Replies are listed 'Best First'.
Re^3: Hash Pipe Problem
by Anonymous Monk on Feb 26, 2009 at 19:35 UTC
    Its telling you how that bit of code was parsed. per perlop, If what's within the angle brackets is neither a filehandle nor a simple scalar variable containing a filehandle name, typeglob, or typeglob reference, it is interpreted as a filename pattern to be globbed

    <FOO> <$FOO> is readline, but <$foo{barr}> is glob

      So is the problem because the handle is to a pipe and not a file? Would it have worked on a regular file handle?

        No. Thing is that it's not a simple scalar (as the docs say). If you assign it to an intermediate variable, such as $fh, it would work.

        my $fh = $ProcesseHandle{$Type}; $Line{$Type} = <$fh>;

        Also note that whitespace, as in < $fh >, isn't allowed either.

        $Line{$Type} = readline $ProcesseHandle{$Type};
        Time to put down the the hash pipe :)