Re: HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

2011-10-21 Thread David Christensen
On 10/21/2011 07:18 PM, newbie01 perl wrote: Am trying to write/convert a customized df script... > I've attached a version of the script in Korn shell. ... ... [input] Filesystemkbytesused avail capacity Mounted on /dev/md/dsk/d1 3099287 2482045 55525782%/ /pr

HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

2011-10-21 Thread newbie01 perl
Hi all, Am trying to write/convert a customized df script in Perl and need some help with regards to using arrays and file handlers. At the moment am using system("df -k > /tmp/df_tmp.00"); To re-direct the df output. Am using df -k because some of the Solaris and HP servers does not have df -h

Re: DBD-mysql-4.020 on OS X 10.6.8: install problem

2011-10-21 Thread Phil Dobbin
On 21/10/11 at 10:12, phildob...@gmail.com (Phil Dobbin) wrote: On 20/10/11 at 17:35, phildob...@gmail.com (Phil Dobbin) wrote: I’m trying to install DBD-mysql-4.020 on OS X 10.6.8 with a fresh install of perl in /usr/local/ (perl 5.14.2) which is in my $PATH. [snip] If anybody’s intereste

Re: Help with Getopt::Std

2011-10-21 Thread newbie01 perl
Hi Brandon, Thanks for your response. Getopt::Std seems to be the simplest one, so am tryiing that one out first :-) Am just trying to port 1:1. Quite painful trying to figure out how to get awk-like behavior in Perl especially when trying to do some calculation on some specific fields. I've see

Re: parsing script misbehaving...

2011-10-21 Thread Rob Dixon
On 21/10/2011 19:16, Brandon McCaig wrote: Thanks for the explanation, Rob. :) use strict; use warnings; use v5.010; my $data = 'aaa bbb ccc'; say $data; for my $pattern (qw(bbb aaa ccc)) { say join ' ', pos($data) // 'undef', $pattern, scalar $data =~ /$pattern/g; } __EN

Re: parsing script misbehaving...

2011-10-21 Thread Brandon McCaig
On Fri, Oct 21, 2011 at 1:52 PM, Rob Dixon wrote: > It is nothing to do with matched patterns overlapping. As I tried to > describe, it is the designed behaviour of m//g in scalar context to find > just one match, searching from the end of the previous match if it was > successful, or restarting f

Re: parsing script misbehaving...

2011-10-21 Thread Rob Dixon
On 21/10/2011 16:32, Jim Gibson wrote: > > I ran the provided program and was going to say that the /g modifier is > unnecessary. I took it out and noticed that the results differed. I > believe the difference is that some of the matched patterns overlap, and > whether or not you want to count

Fwd: [Spreadsheet::WriteExcel] Spreadsheet::WriteExcel is dead. Long live Excel::Writer::XLSX.

2011-10-21 Thread shawn wilson
since this module comes up somewhat frequently here, i figured i'd fwd this along. -- Forwarded message -- From: jmcnamara Date: Tue, Oct 18, 2011 at 08:38 Subject: [Spreadsheet::WriteExcel] Spreadsheet::WriteExcel is dead. Long live Excel::Writer::XLSX. To: "Spreadsheet::WriteEx

Re: Run perl scripts in Windows

2011-10-21 Thread Rajneesh Gadge
Thanks Natxo that was really informative :) -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: parsing script misbehaving...

2011-10-21 Thread Jim Gibson
At 11:55 AM +0100 10/21/11, Rob Dixon wrote: On 21/10/2011 11:31, Nathalie Conte wrote: HI Rob, Hello Nat Please keep your replies to the Perl beginners list, so that other people can both help and learn from the discussion. (It would also help if you could bottom-post your replies (put the

Re: In search of a list class with unusual accessors

2011-10-21 Thread Rob Dixon
On 21/10/2011 04:11, David Christensen wrote: On 10/20/2011 06:28 PM, Rob Dixon wrote: Why are you insisting on an existing class, especially if you are intending to extend it? Laziness. Then the class that Randal has written in this thread should suffice, and does exactly what you describe

Re: parsing script misbehaving...

2011-10-21 Thread John W. Krahn
Rob Dixon wrote: On 21/10/2011 00:32, nac wrote: I have corrected myself a bit, I think the script is now giving me what I want, having said that, I guess it is not the best way ( even if there is more than one way), again any pointer are welcome. many thanks Nat #!/usr/bin/perl use strict;

Re: parsing script misbehaving...

2011-10-21 Thread Nathalie Conte
Rob Dixon wrote: On 21/10/2011 11:31, Nathalie Conte wrote: HI Rob, Hello Nat Please keep your replies to the Perl beginners list, so that other people can both help and learn from the discussion. (It would also help if you could bottom-post your replies (put the response after the text you

Re: parsing script misbehaving...

2011-10-21 Thread Rob Dixon
On 21/10/2011 11:31, Nathalie Conte wrote: HI Rob, Hello Nat Please keep your replies to the Perl beginners list, so that other people can both help and learn from the discussion. (It would also help if you could bottom-post your replies (put the response after the text you are quoting). It i

Re: parsing script misbehaving...

2011-10-21 Thread Rob Dixon
On 21/10/2011 00:32, nac wrote: > HI again, > I have corrected myself a bit, I think the script is now giving me what I > want, having said that, I guess it is not the best way ( even if there is > more than one way), again any pointer are welcome. > many thanks > Nat Hi Nat > #!/usr/bin/perl > u

Re: DBD-mysql-4.020 on OS X 10.6.8: install problem

2011-10-21 Thread Phil Dobbin
On 20/10/11 at 17:35, phildob...@gmail.com (Phil Dobbin) wrote: I’m trying to install DBD-mysql-4.020 on OS X 10.6.8 with a fresh install of perl in /usr/local/ (perl 5.14.2) which is in my $PATH. [snip] [snip] # Faile

Re: parsing script misbehaving...

2011-10-21 Thread Rob Dixon
On 21/10/2011 02:50, John W. Krahn wrote: nac wrote: HI again, Hello, I have corrected myself a bit, I think the script is now giving me what I want, having said that, I guess it is not the best way ( even if there is more than one way), again any pointer are welcome. many thanks Nat #!/usr/

Re: Getting cpamn to work in Windows-7

2011-10-21 Thread Leo Susanto
If you choose to use ActiveState Perl, you need to do "ppm install MinGW" first before you can do "cpan App::cpanminus". On Thu, Oct 20, 2011 at 7:38 AM, Rowan Sylvester-Bradley wrote: > I'm pretty new to Perl, but now I need to install and use a Perl software > package (Daniel Klein's thermd).