in reply to Re^2: read ARGV ==> read on unopened filehandle
in thread read ARGV ==> read on unopened filehandle

As a shorter notation I don't think you gained much unless I'm missing someing, which is entirly possible. From here it looks like you only saved 1 char give or take some spacing.

() = eof(); read ARGV, $b, 1<<12 or die "cannot read ARGV: $!"; open(FH,shift) or die "cannot read file: $!";read FH, $b, 1<<12;

___________
Eric Hodges

Replies are listed 'Best First'.
Re^4: read ARGV ==> read on unopened filehandle
by sauoq (Abbot) on Sep 19, 2005 at 19:13 UTC
    open(FH,shift) or die "cannot read file: $!";read FH, $b, 1<<12;

    Why did you choose such an enormously long name for your filehandle? ;-)

    If you are really going for shortness though, you can still skip read() and set $/ to a reference. Granted that error handling isn't equivalent, but the following should do for use in a one-liner:

    $/=\4096;$b=<>;

    -sauoq
    "My two cents aren't worth a dime.";