Dave Turner on Wed, 2 May 2001 13:58:42 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Quick question: how to slurp a file?


"Susan J. Talbutt" wrote:
> 
> We're beating our heads against a wall here. The office mate swears perl
> has a way to read in an entire file in one gulp (as opposed to the more
> familiar <> operator).
> 
> Can anyone confirm or deny?
> 
> Thanks!
> -------------------------------------------------------------------------
> Susan J. Talbutt                                      talbutt@sabresys.com
> Sabre Systems, Inc.                                       www.sabresys.com


Same operator, different context.

$a = <>; #slurp a line
@a = <>; #slurp the whole file - each line becomes an array element.


-- 
-Dave Turner                               Stalk me:  (215)-545-2859  
--------------------------------------------------------------------
Insert here the quote from Stations Of The Tides that goes something
like: "I'll tear down the stars themselves and put up something 
worth looking at in their place".  I'll fix it when I find my copy.
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**