> "JG" == Jim Green writes:
JG> I tried my @texts = read_file( 'zcat filename.gz|' ) but it doesn't
JG> work, could someone help with this syntax? I would use PerlIO::gz for
JG> large files but prefer a simple call to get the content I want for
JG> smaller files.
read_file uses syso
On May 15, 1:28 am, u...@stemsystems.com ("Uri Guttman") wrote:
> hi all,
>
> As with other releases of File::Slurp I think this list should be told
> about it since this module is so easy to use and makes your Perl much
> simpler and also faster.
>
> uri
>
> Have you ever wanted to use perl -pi in
On Jun 2, 2011 5:35 PM, "Uri Guttman" wrote:
>
> > "sw" == shawn wilson writes:
>
> sw> Nice addition to the module BTW. Haven't had the need for
> sw> File::Slurp (used more specialized modules such as Text::CSV_XS or
> sw> Web::Scraper) but this feature is definitely good. If not just
>
> "sw" == shawn wilson writes:
sw> That looks to be pretty much the same as:
sw> zcat file ¦ script ¦ gzip -c -
sw> (Untested)
yes it is. and a perl one liner like perl -0777p le '$_ .= "text"' is
all you need there. the issue is if text is large and/or from a file.
sw> Nice additio
On Jun 2, 2011 3:58 PM, "Uri Guttman" wrote:
>
> > "JG" == Jim Green writes:
>
> JG> Is there a preferred way to append a text file to the end of gzipped
> JG> file? the api of File::Slurp append_file is nice, but doesn't work
> JG> with gzip file...
>
> wow, that is an odd request. there
> "JSA" == John SJ Anderson writes:
>> Is there a preferred way to append a text file to the end of gzipped
>> file? the api of File::Slurp append_file is nice, but doesn't work
>> with gzip file...
JSA> The concatenation of two gzip'ed files is a valid gzip file, which
JSA> when u
> Is there a preferred way to append a text file to the end of gzipped
> file? the api of File::Slurp append_file is nice, but doesn't work
> with gzip file...
The concatenation of two gzip'ed files is a valid gzip file, which
when ungzip'd will produce a single file containing the contents of
the
> "JG" == Jim Green writes:
JG> Is there a preferred way to append a text file to the end of gzipped
JG> file? the api of File::Slurp append_file is nice, but doesn't work
JG> with gzip file...
wow, that is an odd request. there is no direct way i think with
append_file. maybe with edi
On May 15, 7:13 pm, u...@stemsystems.com ("Uri Guttman") wrote:
> > "PJ" == Paul Johnson writes:
>
> PJ> On Sun, May 15, 2011 at 01:31:47PM -0400, Jim Green wrote:
> >> this is very nice, don't need to call perl in perl anymore..
> >>
> >> perl -pi -e '$_ = "" if /foo/' filename
> >>
> "PJ" == Paul Johnson writes:
PJ> On Sun, May 15, 2011 at 01:31:47PM -0400, Jim Green wrote:
>> this is very nice, don't need to call perl in perl anymore..
>>
>> perl -pi -e '$_ = "" if /foo/' filename
>>
>> but what if the file is very large? slurping the file in to memory wi
On Sun, May 15, 2011 at 01:31:47PM -0400, Jim Green wrote:
> this is very nice, don't need to call perl in perl anymore..
>
> perl -pi -e '$_ = "" if /foo/' filename
>
> but what if the file is very large? slurping the file in to memory will
> be ok?
>
> or is there any other alternatives you
> "JG" == Jim Green writes:
JG> this is very nice, don't need to call perl in perl anymore..
JG> perl -pi -e '$_ = "" if /foo/' filename
JG> but what if the file is very large? slurping the file in to memory will
JG> be ok?
in the slurp distro is an article i wrote for perl.com th
On 15 May 2011 01:28, Uri Guttman wrote:
>
> hi all,
>
> As with other releases of File::Slurp I think this list should be told
> about it since this module is so easy to use and makes your Perl much
> simpler and also faster.
>
> uri
>
> Have you ever wanted to use perl -pi inside perl? did you h
> "OR" == Octavian Rasnita writes:
OR> Congratulations for the idea of adding this helpful feature to
OR> File::Slurp.
OR> It is also useful for adding a string at the beginning of the file
OR> in an easy way, using something like:
OR> edit_file { $_ = "first line\n" . $_ } 'file
From: "Uri Guttman"
>
> hi all,
>
> As with other releases of File::Slurp I think this list should be told
> about it since this module is so easy to use and makes your Perl much
> simpler and also faster.
>
> uri
>
> Have you ever wanted to use perl -pi inside perl? did you have the guts
> to
15 matches
Mail list logo