Perl file with arguments

2010-06-09 Thread Gopal Karunakar
Hi, How can i declare a simple perl script file which will take arguments from the user? an example will be take two numbers and give the sum as output. Thanks in advance, GK.

an odd conditional statement

2010-06-09 Thread sillymonkeysoftw...@gmail.com
Hi everyone, I'm working with some customizable data from a config file, and can't for the life of me figure out how to test conditionals from an external source. Does anyone have an idea how to accomplish something like: my $statement = "1 < 10 and 2 > 10"; # obviously false my $result

Undefined subroutine &Compress::Zlib::gzdopen_ ... , perl-5.8.8

2010-06-09 Thread shashidhar v
Hi , I am trying to build the globus-4.0.7 on solaris 8 , and iam getting the folloing error bash-2.03$ make | tee make.log cd gpt && OBJECT_MODE=32 ./build_gpt build_gpt > installing GPT into /opt/globus-4.0.7 build_gpt > building /export/home/nirvana/gt4.0.7-all-source-installer/

AW: Perl file with arguments

2010-06-09 Thread Thomas Bätzler
Gopal Karunakar asked: > How can i declare a simple perl script file which will take > arguments from the user? an example will be take two numbers and > give the sum as output. Do you want to pass the arguments on the command line or prompt for them after starting your script? In the firs

Re: Perl file with arguments

2010-06-09 Thread trapd00r
On 09/06/10 13:14 +0530, Gopal Karunakar wrote: How can i declare a simple perl script file which will take arguments from the user? an example will be take two numbers and give the sum as output. use strict; print calc(@ARGV); sub calc { my @to_add = @_; my $i = 0; for my $num(@to_

Re: Perl file with arguments

2010-06-09 Thread Shlomi Fish
On Wednesday 09 Jun 2010 10:44:35 Gopal Karunakar wrote: > Hi, > > How can i declare a simple perl script file which will take arguments > from the user? an example will be take two numbers and give the sum as > output. > > Thanks in advance, > See @ARGV: [code] #!/usr/bin/perl use stric

Re: an odd conditional statement

2010-06-09 Thread Uri Guttman
> "sc" == sillymonkeysoftw...@gmail com > writes: sc> I'm working with some customizable data from a config file, and can't sc> for the life of me figure out how to test conditionals from an sc> external source. sc> Does anyone have an idea how to accomplish something like: sc

Re: an odd conditional statement

2010-06-09 Thread Shlomi Fish
On Wednesday 09 Jun 2010 02:43:57 sillymonkeysoftw...@gmail.com wrote: > Hi everyone, > > I'm working with some customizable data from a config file, and can't > for the life of me figure out how to test conditionals from an > external source. > Does anyone have an idea how to accomplish something

Re: an odd conditional statement

2010-06-09 Thread Uri Guttman
> "SF" == Shlomi Fish writes: SF> On Wednesday 09 Jun 2010 02:43:57 sillymonkeysoftw...@gmail.com wrote: >> Hi everyone, >> >> I'm working with some customizable data from a config file, and can't >> for the life of me figure out how to test conditionals from an >> external sourc

AW: an odd conditional statement

2010-06-09 Thread Thomas Bätzler
sillymonkeysoftw...@gmail.com asked: > I'm working with some customizable data from a config file, and can't > for the life of me figure out how to test conditionals from an > external source. > Does anyone have an idea how to accomplish something like: > > my $statement = "1 < 10 and 2 > 1

Re: AW: an odd conditional statement

2010-06-09 Thread Uri Guttman
> "TB" == Thomas Bätzler writes: TB> You can do something like TB> my $cond = eval( $statement ); TB> The two important things to keep in mind: TB> 1) Make sure you sanitize $statement very carefully. Otherwise people can run arbitrary perl commands and you probably don't want t

Re: How to find the status, i.e. "next run time" and "last run time", of a task which is run through windows task scheduler !

2010-06-09 Thread C.DeRykus
On Jun 8, 2:18 am, learn.tech...@gmail.com (Amit Saxena) wrote: > Hi all, > > I want to know how to find the status, i.e. "next run time" and "last run > time", of a task which is run through windows task scheduler. > > This is required so as to find out instances where a task gets "hanged" > after

A subroutine to find every occurrence of a substring in a string?

2010-06-09 Thread Peng Yu
I can't find an existing perl subroutine (in the library) to find every occurrence of a substring in a string. The following webpage "Example 3b. How to find every occurrence" uses a loop to do so. But I'd prefer a subroutine. Could you let me know if such a subroutine is available in perl library?

AW: A subroutine to find every occurrence of a substring in a string?

2010-06-09 Thread Thomas Bätzler
Peng Yu asked: > I can't find an existing perl subroutine (in the library) to find > every occurrence of a substring in a string. The following webpage > "Example 3b. How to find every occurrence" uses a loop to do so. But > I'd prefer a subroutine. Could you let me know if such a subroutine is >