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 PROTECTED]

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; } sub b { print

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: snip

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 subdirectories and

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 installation on

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: 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] Sent: 18 November 2008 08:53 To: beginners@perl.org

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 Now

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 following data..

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 those IPs ranges,

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 file containing IP addresses ranges, their negations, and comments. E.g

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/10/08 10:25 De : Stewart Anderson

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 wrote: From: mrstevegross [mailto

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

RE: regex for

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 a perl regex /

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 install the module

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

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 directory? If

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 Type =

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 source

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: certification for perl

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

RE: Generating Excel Charts from *nix

2008-10-01 Thread Stewart Anderson
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 whole thing is all

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 files, if one of them

RE: Perl Sockets oddity..

2008-09-24 Thread Stewart Anderson
, but for some reason it will not print to the screen. I'm stuck!!! [Stewart Anderson] Is it that perl is interpolating $text and your argument has symbols in it ? Quoting the var might help? Information in this email including any attachments may be privileged, confidential and is intended

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 trust the transfer method

RE: Need help with developing Twiki plugins

2008-09-18 Thread Stewart Anderson
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 attachments may be privileged, confidential and is intended exclusively

RE: Get the last entry of log file

2008-09-17 Thread Stewart Anderson
, there's hope. Cross Time Cafe Perl is the duct tape of the Internet. Hassan Schroeder, Sun's first webmaster -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ [Stewart Anderson] How about

RE: Round a digit in perl

2008-09-12 Thread Stewart Anderson
/citspndelimndash;/delimcitepn252/citepn 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
= $sth-fetchrow_hashref()) { my @arr1 = (); $count = $count + 1; %arr1 = %$href1; if ($count == 100) { # print to the output file print PTR %arr1; } } Thanks Regards, Amit Saxena [Stewart Anderson] Any particular reason you

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

2008-09-11 Thread Stewart Anderson
. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ [Stewart Anderson] Damn I missed that bit :) Information in this email including any attachments may be privileged, confidential and is intended exclusively

RE: perl if/then

2008-09-04 Thread Stewart Anderson
=/usr/local/bin/scp $scpargs $srcdir ${host}:/ 21; } That if has 2 blocks. -- 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] if ($host eq $hostname

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

2008-08-26 Thread Stewart Anderson
will take current file as an input, exit temporarily to the shell and once ENTER is pressed, returns to the original program ? Regards, Amit Saxena [Stewart Anderson] I edit using ultraedit, it has ssh save options. You can combine any editor with winscp to scurely copy changes to another

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

2008-08-22 Thread Stewart Anderson
://www.perldebugged.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ [Stewart Anderson] ohoh EMACS preacher proximity alert just went off :) Information in this email including any attachments may be privileged

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

2008-08-21 Thread Stewart Anderson
, matching all the properly nested curly braces and finding out the mismatched one takes lots of effort and time. It happened with me yesterday when I was working with a perl code of around 3000 lines long and it took me nearly 1.5 hours to find out the exact line where the problem is. [Stewart

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: -Original Message

RE: doubt in code

2008-08-21 Thread Stewart Anderson
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. Regards Irfan. [Stewart Anderson] my $fh = IO::Socket::INET-new($server); is where the file handle $fh gets assigned Information

RE: Not able to open a file.

2008-08-14 Thread Stewart Anderson
)|| die Couldnt open pdef file - $!\n; Any idea what is wrong..( the file exists in the same path as the script is.) [Stewart Anderson] This works. #!/usr/bin/perl use strict; use warnings ; my $filetoopen=test.out; open FILEH, '', $filetoopen or die Can't open file:\t

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 off a decimal

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 scripts

RE: perl2exe

2008-07-24 Thread Stewart Anderson
an executable image. HTH, Rob [Stewart Anderson] Hi, I thought I read somewhere that generating executable Perl binaries was at best in the prototype stages of evolution. I'm not putting down the efforts of IndigoSTAR or any others who are involved in producing tools like

RE: Request for advice/suggestions....

2008-07-24 Thread Stewart Anderson
were exported from the Categories module and the data itself was kept private. Only you know what is possible here. HTH, [Stewart Anderson] May be a bit late for this but, you could also use Config::Simple to achieve this. I know its intended for config files but it would lend itself

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. I need

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 [mailto:[EMAIL PROTECTED] Sent: 22 July 2008 02:41

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 second intervals.

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. - [EMAIL PROTECTED] OK Thanks :) Stu

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, [$direction,

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: 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: Amit

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

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 am

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 Services (SNS) Extension: 7212 Direct

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; [EMAIL

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- From: Ravi

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.

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