RE: perl version for windows

2008-11-25 Thread Stewart Anderson
> -Original Message- > From: Chas. Owens [mailto:[EMAIL PROTECTED] > Sent: 24 November 2008 20:18 > To: Jenda Krynicky > Cc: Perl Beginners > Subject: Re: perl version for windows > > On Mon, Nov 24, 2008 at 10:34, Jenda Krynicky <[EMAIL PROTECTED]> wrote: > > From: "Chas. Owens" <[EMAIL

RE: Regarding conditional statement

2008-11-24 Thread Stewart Anderson
> -Original Message- > From: suresh kumar [mailto:[EMAIL PROTECTED] > Sent: 24 November 2008 10:41 > To: beginners@perl.org; [EMAIL PROTECTED]; Amit Saxena > Subject: Regarding conditional statement > > Hi, > > Here is the sample code: > > sub a { > print "i am a\n"; > return 0; > } >

RE: need help with SpreadSheet::Parse perl module

2008-11-21 Thread Stewart Anderson
> -Original Message- > From: Chas. Owens [mailto:[EMAIL PROTECTED] > Sent: 21 November 2008 13:13 > To: Manasi Bopardikar > Cc: beginners@perl.org > Subject: Re: need help with SpreadSheet::Parse perl module > > On Fri, Nov 21, 2008 at 07:33, Manasi Bopardikar > <[EMAIL PROTECTED]> wrote

RE: Determining if a file is more than so many days old

2008-11-20 Thread Stewart Anderson
> -Original Message- > From: AndrewMcHorney [mailto:[EMAIL PROTECTED] > Sent: 20 November 2008 15:19 > To: beginners@perl.org > Subject: Determining if a file is more than so many days old > > Hello > > I am working on a perl script that will go through a directory and > it's subdirector

RE: CPAN question

2008-11-19 Thread Stewart Anderson
> -Original Message- > From: Kevin Murphy [mailto:[EMAIL PROTECTED] > Sent: 18 November 2008 19:14 > To: beginners@perl.org > Subject: CPAN question > > Hi, > > I'm a system administrator, not a programmer, and my only experience > with Perl is setting up and maintaining a Bugzilla instal

RE: Regular expression problem

2008-11-18 Thread Stewart Anderson
> -Original Message- > From: Stewart Anderson > Sent: 18 November 2008 12:20 > To: beginners@perl.org > Cc: Stewart Anderson > Subject: RE: Regular expression problem > > > -Original Message- > > From: howa [mailto:[EMAIL PROTECTED] > &

RE: Regular expression problem

2008-11-18 Thread Stewart Anderson
> -Original Message- > From: howa [mailto:[EMAIL PROTECTED] > Sent: 18 November 2008 08:53 > To: beginners@perl.org > Subject: Regular expression problem > > Hello, > > I have two strings: > > 1. abc > 2. abc& > > > The line of string might end with "&" or not, so I use the expression:

RE: to read a line 2 lines above a line having a grepped string...

2008-11-11 Thread Stewart Anderson
> -Original Message- > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: 11 November 2008 13:48 > To: Perl Beginners > Subject: Re: to read a line 2 lines above a line having a grepped > string... > > dilip wrote: > > hi all, > > Hello, > > > suppose i have a file having the followin

RE: to read a line 2 lines above a line having a grepped string...

2008-11-11 Thread Stewart Anderson
> From: dilip [mailto:[EMAIL PROTECTED] > Sent: 11 November 2008 11:18 > To: beginners@perl.org > Subject: to read a line 2 lines above a line having a grepped string... > > hi all, > > suppose i have a file having the following data.. > > SN = TOM > FDN = SALLY > OPERATIONAL STATE = ENABLED >

RE: Using perl in a Bash-script to extract IP-addresses?

2008-11-10 Thread Stewart Anderson
> From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: 10 November 2008 11:26 > To: Perl Beginners > Subject: Re: Using perl in a Bash-script to extract IP-addresses? > > Stewart Anderson wrote: > >> JC Janos wrote: > >>> > >>> I have a fil

RE: Using perl in a Bash-script to extract IP-addresses?

2008-11-10 Thread Stewart Anderson
> > JC Janos wrote: > > Hi, > > Hello, > > > I have a file containing IP addresses & ranges, their negations, and > > comments. E.g., > > > > 1.1.1.1 # comment A > > 2.2.2.2/29 # comment B > > !3.3.3.3 # comment C > > !4.4.4.4/28 # comment D > > > > I need to extract

RE: How to put a global variable in a package, accessible to users of that package?

2008-10-31 Thread Stewart Anderson
> -Original Message- > From: Rob Dixon [mailto:[EMAIL PROTECTED] > Sent: 31 October 2008 11:51 > To: Perl Beginners > Cc: Stewart Anderson > Subject: Re: How to put a global variable in a package, accessible to > users of that package? > > Stewart Anderson wro

RE: How to put a global variable in a package, accessible to users of that package?

2008-10-31 Thread Stewart Anderson
> -Original Message- > From: Jeff Pang [mailto:[EMAIL PROTECTED] > Sent: 31 October 2008 09:38 > To: Perl Beginners [Beginners Perl] > Subject: RE: How to put a global variable in a package, accessible to > users of that package? > > > > Message du 31

RE: How to put a global variable in a package, accessible to users of that package?

2008-10-31 Thread Stewart Anderson
> From: mrstevegross [mailto:[EMAIL PROTECTED] > Sent: 30 October 2008 18:43 > To: beginners@perl.org > Subject: How to put a global variable in a package, accessible to users of > that package? > > I have a package named "Foo" in which I want to define some package- > level constants (such as $VA

beginners@perl.org

2008-10-30 Thread Stewart Anderson
> -Original Message- > From: Brent Clark [mailto:[EMAIL PROTECTED] > Sent: 30 October 2008 09:57 > To: beginners@perl.org > Subject: regex for & > > Hiya > > I have three sentences. > > This is a nice hotel. > The view & food is good. > We are at the Victoria & Alfred Hotel. > > I need

RE: Strip HTML from files in a directory

2008-10-29 Thread Stewart Anderson
> -Original Message- > From: bdy [mailto:[EMAIL PROTECTED] > Sent: 29 October 2008 15:14 > To: beginners@perl.org > Subject: Strip HTML from files in a directory > > Does anyone know if there's a way to use an HTML stripper in Perl to > scrub the HTML from all files in a specified director

RE: Doubt in Spreadsheet::ParseExcel

2008-10-29 Thread Stewart Anderson
_ From: anitha victor [mailto:[EMAIL PROTECTED] Sent: 29 October 2008 08:54 To: beginners@perl.org Subject: Doubt in Spreadsheet::ParseExcel Hi Team, I want a code snippet for retrieving the content in xcel sheet in a variable. Thanks in advance The CPAN documentation for thi

RE: Installing perl modules

2008-10-29 Thread Stewart Anderson
> Hi Andy, > > > Andy Cravens wrote: > > Is there a way to have multiple users on a server using the perl at > > /usr/local/bin/perl and yet have their own personal perl modules that > > the other users can't see? > > > ... > > During module install you can specify an alternate location to instal

RE: :Simple question

2008-10-22 Thread Stewart Anderson
> -Original Message- > From: Richard Lee [mailto:[EMAIL PROTECTED] > Sent: 22 October 2008 06:00 > To: Perl Beginners > Subject: XML::Simple question > > while trying to study the article on perlmonks.org, > > http://perlmonks.org/?node_id=490846 > > regarding XML parsing, I need bit of

RE: Send Mail with attachment

2008-10-22 Thread Stewart Anderson
> > Hi All, > > I'm using perl module MIME::Lite to sent out email with attachments, > may I know what "Type" should I define to attach any type of files, > for instance .jpg, .xls, .doc, .pdf and etc without checking the > attached file type. Is there any global variable to define instead of >

RE: how to count line numbers in file quickly?

2008-10-08 Thread Stewart Anderson
> -Original Message- > From: loody [mailto:[EMAIL PROTECTED] > Sent: 08 October 2008 08:56 > To: Perl beginners > Subject: Re: how to count line numbers in file quickly? > > Dear all: > I try to write a perl to compare whether the line numbers of 2 files > is equivalent. > Below is my

RE: certification for perl

2008-10-06 Thread Stewart Anderson
> From: Jeff Pang [mailto:[EMAIL PROTECTED] > Sent: 06 October 2008 14:37 > To: Praveena Vittal > Cc: beginners@perl.org > Subject: Re: certification for perl > > > Message du 06/10/08 15:31 > > De : "Praveena Vittal" > > A : "Jeff Pang" > > Copie à : beginners@perl.org > > Objet : Re: certificati

RE: Generating Excel Charts from *nix

2008-10-01 Thread Stewart Anderson
one anything like this before? Ta Stu [Stewart Anderson] Meant to say that I don't want to do this is Win32::OLE, I can just as easy do it from outlook when I send the mail with the sheet attached, really looking for a "neat" perl solution for the w

Generating Excel Charts from *nix

2008-10-01 Thread Stewart Anderson
Hi all, I am looking to find a way to generate an excel sheet with charts on a *nix flavour (its MAC OSX Actually). I used Spreadsheet:::WriteExcel quite happily to gen a sheet and fill it with the data I want. However the chart facility has a slight drawback in that you ne

RE: send die "" to a file

2008-09-26 Thread Stewart Anderson
> -Original Message- > From: Li, Jialin [mailto:[EMAIL PROTECTED] > Sent: 26 September 2008 06:16 > To: aa aa > Cc: beginners@perl.org > Subject: Re: send die "" to a file > > On Thu, Sep 25, 2008 at 11:55 PM, aa aa <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > I try to open several fi

RE: Perl Sockets oddity..

2008-09-24 Thread Stewart Anderson
"< 9/24/2008><12:25:43>|" isn't numeric in numeric eq > (==) at ilog.pl line 16. > Argument "< 9/24/2008><12:25:43>||" isn't numeric in > numeric eq (==) at ilog.pl line 16. > > So, $text does contain the result, but for some re

RE: Making a program more robust with regard to line endings

2008-09-23 Thread Stewart Anderson
> See `perldoc -f binmode` and search for ":crlf" > > [Stewart Anderson] Or provide your operators with a means that enforces the transfer in the mode you actually want it? Then you don't have to do any changes to your own code, as long as you can tr

RE: Need help with developing Twiki plugins

2008-09-18 Thread Stewart Anderson
ive me some > comprehensive information on Twiki and step by step of how to deveop a > plugin using standard twiki functions? > > > [Stewart Anderson] Comprehensive docs seem to be here: http://twiki.org/cgi-bin/view/TWiki/WebHome Information in this email including any attachmen

RE: Get the last entry of log file

2008-09-17 Thread Stewart Anderson
lledPlugins | > > > Mozilla | 10.77.224.12 | > > > > > > | 16 Sep 2008 - 04:50 | TWikiGuest | view | TWiki.InstalledPlugins | > > > Mozilla | 10.88.68.26 | > > > > > > | 17 Sep 2008 - 04:54 | TWikiGuest | view | TWiki.TWikiFuncDotPm | > > Moz

RE: Round a digit in perl

2008-09-12 Thread Stewart Anderson
> > Similarly, > > 100-5 100-105 > 198-10198-210. > [Stewart Anderson] Have a look at XML::Smart it has an easy to use interface. You could run through your xml elements and just prefix the elements with the new code. That might take a little

RE: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Stewart Anderson
then be called again to fetch more rows. > > > -- > Affijn, Ruud > > "Gewoon is een tijger." > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > [Stewart Anderson] Dam

RE: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Stewart Anderson
unt == 100) > { ># print to the output file >print PTR %arr1; > } > } > > Thanks & Regards, > Amit Saxena [Stewart Anderson] Any particular reason you don't want to do that, it seems to me that whichever way you do it you will

RE: perl if/then

2008-09-04 Thread Stewart Anderson
r/bin/rdist $args $srcdir ${host}:$destdir 2>&1";} > > else > > {$cmd="/usr/local/bin/scp $scpargs $srcdir ${host}:/ 2>&1"; } > > That if has 2 blocks. > > -- > Affijn, Ruud > > "Gewoon is een tijger." > > -- > To u

RE: Perl and "vi" (not "vim") , ctags like feature in Perl !

2008-08-26 Thread Stewart Anderson
and CTRL-D > > back > > to the VI, this is my way, maby there is easy steps... > > > > // Anders > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > http://learn.perl.org/ >

RE: About the error message in Perl : "Missing right curly braces"

2008-08-22 Thread Stewart Anderson
just found a use case to come over to the path of > righteousness :-) :-) :-) > > Seriously, perltidy is a good suggestion given your parameters. > > -- > Peter Scott > http://www.perlmedic.com/ > http://www.perldebugged.com/ > > > -- > To unsubscribe, e-mail: [EMAIL

RE: doubt in code

2008-08-21 Thread Stewart Anderson
rst line of a file from > remote server. So my understanding is that, it will go to remote > server,read the file and then prints the first line of a file on the > existing console. is it right ?? if yes then in the code where are we > giving the filename?? > > Please suggest. > &g

RE: About the error message in Perl : "Missing right curly braces"

2008-08-21 Thread Stewart Anderson
_ From: Amit Saxena [mailto:[EMAIL PROTECTED] Sent: 21 August 2008 10:01 To: Stewart Anderson Cc: Perl Subject: Re: About the error message in Perl : "Missing right curly braces" On Thu, Aug 21, 2008 at 2:23 PM, Stewart Anderson <[EMAIL PROTECTED]> wrote: > --

RE: About the error message in Perl : "Missing right curly braces"

2008-08-21 Thread Stewart Anderson
ound 3000 lines long and it took me nearly 1.5 hours to > find > out the exact line where the problem is. [Stewart Anderson] I usually go back to where I was last editing. I do regular syntax checks to see if I missed anything as I'm going too. Information in this email including

RE: Not able to open a file.

2008-08-14 Thread Stewart Anderson
icitly mention the path. but i dont > > > > want that.. > > > > > > > > my script is.. > > > > > > > > use strict; > > > > use warnings; > > > > my $fil="pdef.txt"; > > > > open(DEFILE,"<$f

RE: how to round off a decimal to the next whole number

2008-08-06 Thread Stewart Anderson
> -Original Message- > From: Anirban Adhikary [mailto:[EMAIL PROTECTED] > Sent: 06 August 2008 06:51 > To: beginners@perl.org > Subject: Re: how to round off a decimal to the next whole number > > On Wed, Aug 6, 2008 at 11:01 AM, <[EMAIL PROTECTED]> wrote: > > > Hi, > > How do I round of

RE: use of Configuration files

2008-07-30 Thread Stewart Anderson
> -Original Message- > From: mani kandan [mailto:[EMAIL PROTECTED] > Sent: 30 July 2008 17:50 > To: beginners@perl.org > Subject: use of Configuration files > > > Dear gurus, > > I want to know how to use configuration files concept in Perl, using > configuration files working with Perl

RE: Request for advice/suggestions....

2008-07-24 Thread Stewart Anderson
aper %records); > > %paper = ( > p01 => 'PAPER ITEMS GENERAL', > p02 => 'Diaries and Journals', > p03 => 'Indentures', > p04 => 'Letters', > p05 => 'Certificates', > p10 => 'Other Paper Item

RE: perl2exe

2008-07-24 Thread Stewart Anderson
C as well as the relevant > modules for your program. Once you have tested it thoroughly under the > perl > interpreter you can use perl2exe to build an executable image. > > HTH, > > Rob [Stewart Anderson] Hi, I thought I read somewhere that generating executable Perl binaries

RE: parsing a large excel file

2008-07-22 Thread Stewart Anderson
> -Original Message- > From: Stewart Anderson > Sent: 22 July 2008 09:34 > To: ANJAN PURKAYASTHA; beginners@perl.org > Cc: Stewart Anderson > Subject: RE: parsing a large excel file > > > > -Original Message- > > From: ANJAN PURKAYASTHA [m

RE: parsing a large excel file

2008-07-22 Thread Stewart Anderson
> -Original Message- > From: ANJAN PURKAYASTHA [mailto:[EMAIL PROTECTED] > Sent: 22 July 2008 02:41 > To: beginners@perl.org > Subject: parsing a large excel file > > to all, > i have installed Spreadshee::ParseExcel to parse some large excel data > files. > Here is the problem I'm facing

RE: Perl DBI->Connect: how to detect a a lost connection

2008-07-21 Thread Stewart Anderson
Ravi Malghan wrote: > Hi: I have a script which connects to a database when it starts up > > $dbh = DBI->connect("dbi:Pg:dbname=$dbname;host=$host;port=$port;", > "$username", "$password", {AutoCommit => 1}); > > followed by a while loop which runs a query for this connection at 60 secon

RE: how do you do this in one step instead of two

2008-07-18 Thread Stewart Anderson
On Fri, Jul 18, 2008 at 12:26 AM, Stewart Anderson <[EMAIL PROTECTED]> wrote: >> > > push @hh, [$direction, $source]; > > Is that creating an "anonymous reference" ? > I think it's an anonymous array, not an anonymous reference. -- Regards, Jeff

RE: how do you do this in one step instead of two

2008-07-17 Thread Stewart Anderson
On Fri, Jul 18, 2008 at 12:00 AM, Richard Lee <[EMAIL PROTECTED]> wrote: > is there way to do this in one step? > > push @array, ($direction, $source); > >push @hh, [EMAIL PROTECTED] > > > push @hh \($direction,$source) doesn't seem to work.. or not the samething > push @hh, [$direct

RE: A newbie question - line number inside the script

2008-07-16 Thread Stewart Anderson
This demonstrates it simply enough. #!/usr/local/ActivePerl-5.8/bin/perl sub errorhandler { local ($trapped_line_no) = @_ ; print "\nThe error handler was invoked from line no is:\t " . $trapped_line_no . "\n" ; } errorhandler( __LINE__ ) ; -Original Message- From: Ami

RE: A newbie question - line number inside the script

2008-07-16 Thread Stewart Anderson
You could use the __LINE__ directive in your error handler. -Original Message- From: Amit Saxena [mailto:[EMAIL PROTECTED] Sent: 16 July 2008 11:25 To: Amit Koren Cc: beginners@perl.org Subject: Re: A newbie question - line number inside the script On Wed, Jul 16, 2008 at 3:52

RE: possible to compare two excel file by using Perl?

2008-07-15 Thread Stewart Anderson
I hope you have sent a complete working program. That is what the list is for after all, isn't it ? -Original Message- From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] Sent: 15 July 2008 12:20 To: beginners@perl.org; ramkumar Subject: Re: possible to compare two excel file by using

RE: function call help

2008-07-09 Thread Stewart Anderson
( $lockitem ) = @_ ; print "Locking VOB:\t$lockitem \n"; #`/usr/atria/bin/cleartool lock:$a`; #if($?){print "Locking of VOB $lock failed\n";} #else{print "Locking of VOB $lock done\n"; #} } Stewart Anderson Application Support Analyst Sky Network S

RE: closing dbh with active statement handles

2008-07-09 Thread Stewart Anderson
Is that due to the "use strict ;" pragma? Ta Stu -Original Message- From: Octavian Rasnita [mailto:[EMAIL PROTECTED] Sent: 09 July 2008 06:07 To: luke devon; Perl Subject: Re: closing dbh with active statement handles From: "luke devon" <[EMAIL PROTECTED]> Hi Friends, Here, I

RE: arrayref

2008-07-08 Thread Stewart Anderson
Use this in the loop it might make it easier to see. foreach my $region ( keys %Regions ) { print "Region:\t$region\n" ; print "\t\t @{ $Regions{$region} }\n"; } -Original Message- From: elavazhagan perl [mailto:[EMAIL PROTECTED] Sent: 08 July 2008 12:00 To: Dr.Ruud; [EM

RE: Perl how to die without printing out a message?

2008-07-02 Thread Stewart Anderson
Send it to an error sub ? connect("dbi:Pg:dbname=$dbname;host=$host;port=$port;","$username", "$password", {AutoCommit => 1}) or &Error("error message"); sub Error { my ($errormessage) = @_ sendmail etc } HTH Stu -Original Message- Fro

Perl to ftp files remote to local

2008-06-23 Thread Stewart Anderson
Hi, I'm sure there are a zillion ways of doing this, but rather than re-invent the wheel I thought I'd use my best skill - "The ability to ask someone else and plaguerise :)" So, I would like to poll a remote server (production app server) find files (log files) in a specific directo

RE: 2 part question for DBI-1.604

2008-06-23 Thread Stewart Anderson
Hi Tim, I totally understand the "rebuild perl" approach, you mentioned in that I know what you mean and how to go about it;but I'm fairly new to Perl too and that seems like a big undertaking for 1 module, 1, because I'm new to perl and building environments in general and 2.