Re: Save to memory temporarily

2010-03-18 Thread Linux Expert
> > > Not easily. WWW::Mechanize is a LWP::UserAgent; look at the > documentation for that module and see the :content_cb hook. Write a > handler to concatenate data in memory until you reach 10MB and then flush > to disk, writing the remainder there. Set read_size_hint to below 10MB. > > This i

Question about example in "Mastering Perl"

2010-03-19 Thread Linux Expert
In Chapter 12, Detecting and Reporting Errors, pg 195, and example is given of an attempt to recover from a failed open by inspecting the values in the %! hash. Here's an excerpt from that example: if( $!{ENOENT} ) # File doesn't exist { warn "\tTrying to make directory $dir...\n"; mkdir

Re: Question about example in "Mastering Perl"

2010-03-19 Thread Linux Expert
Of course, I shoulda' seen that. Thanks! On 3/19/10, David Christensen wrote: > Linux Expert wrote: >> if( $!{ENOENT} ) # File doesn't exist >> { >> warn "\tTrying to make directory $dir...\n"; >> mkdir $dir, 0755; >> } >

Re: filter script read STDIN from named pipe >file

2010-03-21 Thread Linux Expert
> Again... appears to work. > > However the log file takes quite a long time to starting showing any > action, and then stay well behind the console output. > Try adding the following line after your 'use warnings' line: $|++; That will disable output buffering on the currently-selected filehandl

Not understanding deleted symbol key access

2010-04-15 Thread Linux Expert
I'm following an example in "Mastering Perl" pg 130. He demonstrates setting package variables $m and $n and displays their contents as well as their keys held in the symbol table. He then proceeds to delete the symbol table keys for said variables, yet they still somehow hold their value. What

Re: Not understanding deleted symbol key access

2010-04-17 Thread Linux Expert
On Thu, Apr 15, 2010 at 2:25 PM, C.DeRykus wrote: > On Apr 15, 8:57 am, linuxexper...@gmail.com (Linux Expert) wrote: > > I'm following an example in "Mastering Perl" pg 130. He demonstrates > > setting package variables $m and $n and displays their contents as we

Re: Using backtick operator output and feeding it into array

2010-04-21 Thread Linux Expert
(@digOutput) = `dig -x $ipaddie +short`; The line shown above is replacing the entire @digOutput array on each assignment. Try this instead: push @digOutput,`dig -x $ipaddie +short`;

Re: Output formatting help

2011-08-02 Thread Linux Expert
On Mon, Aug 1, 2011 at 1:54 AM, newbie01 perl wrote: > > Hi all, > > I have several *nix version of Unix and while some I can use df -h, for > some I can't. The only common thing that I can use that works for all is df > -k. > > > Below is the output when r