Re: Testing a standalone script

2013-10-29 Thread Manfred Lotz
On Tue, 29 Oct 2013 12:01:52 -0700 John SJ Anderson wrote: > On Tue, Oct 29, 2013 at 11:02 AM, Manfred Lotz > wrote: > > This is exactly what I don't want to do. IMHO, for testing modules > > or applications this is the way to go. However, for a standalone > > sc

Re: Testing a standalone script

2013-10-29 Thread John SJ Anderson
On Tue, Oct 29, 2013 at 11:02 AM, Manfred Lotz wrote: > This is exactly what I don't want to do. IMHO, for testing modules or > applications this is the way to go. However, for a standalone script > I'd like to have my test data inside the script itself. Well, you could add so

Re: Testing a standalone script

2013-10-29 Thread Manfred Lotz
ommended way to test standalone scripts? > > > > > > Put the tests in a directory call "t" under the source. And see > `man prove`. `prove` is a Perl tool for testing modules but it can be > adapted for scripts. Each test script is given the extension *.t . >

Re: Testing a standalone script

2013-10-29 Thread Shawn H Corey
quot; under the source. And see `man prove`. `prove` is a Perl tool for testing modules but it can be adapted for scripts. Each test script is given the extension *.t . -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For addi

Testing a standalone script

2013-10-29 Thread Manfred Lotz
Hi there, I have some relatively small standalone perl scripts where I would like to include tests. Which is the recommended way to test standalone scripts? -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://lea

Re: I'd like to explain to me how to do testing on lists and list slices

2012-03-10 Thread m...@roundcube.fakessh.eu
+/) > > Should it be "records" instead of "recording"? > > > I would like to test on how many times a user or an ip c is connected > > via the time value and authorize or not the execution of the following > > function > > > > I&#

Re: I'd like to explain to me how to do testing on lists and list slices

2012-03-10 Thread Shlomi Fish
e file contains > and recording are separated by a space (/\s+/) Should it be "records" instead of "recording"? > I would like to test on how many times a user or an ip c is connected > via the time value and authorize or not the execution of the following > function >

I'd like to explain to me how to do testing on lists and list slices

2012-03-09 Thread ml
(/\s+/) I would like to test on how many times a user or an ip c is connected via the time value and authorize or not the execution of the following function I'd like to explain to me how to do testing on lists and list slices sincerely -- http://pgp.mit.edu:11371/pks/lookup?op=get&sea

Re: Testing for Missing Packages

2011-12-24 Thread Shlomi Fish
Hi Eric, On Sat, 24 Dec 2011 20:23:17 -0500 Eric James Michael Ritz wrote: > Hello everyone. > > Here is my question: What is the preferred way to test a system for > installed modules? For example, I have a Perl program I would like to > distribute. It depends on a number of modules from CPA

Testing for Missing Packages

2011-12-24 Thread Eric James Michael Ritz
Hello everyone. Here is my question: What is the preferred way to test a system for installed modules? For example, I have a Perl program I would like to distribute. It depends on a number of modules from CPAN and I would like an easy way to test for the existence of those modules. I suppose t

Re: AW: Testing File Contents

2011-03-04 Thread Dr.Ruud
On 2011-03-02 19:22, Christian Marquardt wrote: open CFG, '<', $_file || die("could not open file: $_file!"); That only dies if $_file is false. Funny that you did use parentheses with die. Some '$' characters were missing too: open my $CFG, '<', $_file or die "Error opening '$_file'

Re: Testing File Contents

2011-03-03 Thread C.DeRykus
On Mar 2, 9:55 am, lm7...@gmail.com (Matt) wrote: > I am looking for a simple way to test if a file does not contain a > string.  This is on a linux box. > > if myfile does not contain mystring { >   #do_something; >   } > > The file is basically a list of names and I want to test that a > certain

Re: Testing File Contents

2011-03-02 Thread Brian F. Yulga
Uri Guttman wrote: > "BFY" == Brian F Yulga writes: BFY> My apologies if I'm beating a dead horse here, but I'm new to Perl and BFY> thought of a slightly different approach: BFY> my $searchrx = qr/whatever/; # or q/whatever/ if you don't need regexp BFY> @ARGV or die qq/you didn't s

Re: Testing File Contents

2011-03-02 Thread Brian F. Yulga
Ken Slater wrote: > From: Brian F. Yulga [mailto:byu...@langly.dyndns.org] > On Wed, 2 Mar 2011, Matt wrote: >> The easiest way in my opinion is to use the 'grep' function like >> this: >> >> my $searchstring="whatever"; open CFG, '<', $_file || die("could >> not open file: $_file!"); my @dat

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
> "RD" == Rob Dixon writes: RD> Thanks Uri. It's midnight and I should be in bed :-/ we should all be in bed! RD> Version 2: RD> sub file_contains { RD> my ($file, $string) = @_; RD> open my $fh, '<', $file or die $!; RD> my %names = map { chomp; ($_ => 1) } <$fh>

Re: Testing File Contents

2011-03-02 Thread Rob Dixon
On 02/03/2011 23:56, Uri Guttman wrote: "RD" == Rob Dixon writes: RD> On 02/03/2011 17:55, Matt wrote: >> >> I am looking for a simple way to test if a file does not contain a >> string. This is on a linux box. >> >> if myfile does not contain mystring { >> #do_somet

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
> "RD" == Rob Dixon writes: RD> On 02/03/2011 17:55, Matt wrote: >> >> I am looking for a simple way to test if a file does not contain a >> string. This is on a linux box. >> >> if myfile does not contain mystring { >> #do_something; >> } >> >> The file is basically a

Re: Testing File Contents

2011-03-02 Thread Rob Dixon
On 02/03/2011 17:55, Matt wrote: I am looking for a simple way to test if a file does not contain a string. This is on a linux box. if myfile does not contain mystring { #do_something; } The file is basically a list of names and I want to test that a certain name is not in there. Is th

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
> "sw" == shawn wilson writes: >> less code, much much faster. you loop over each line. my code does one >> regex call and stays inside perl for that. inside perl is usually faster >> than running perl op. use the benchmark module and look at the >> difference. it will be noticeable.

RE: Testing File Contents

2011-03-02 Thread Wagner, David --- Senior Programmer Analyst --- CFS
>-Original Message- >From: Matt [mailto:lm7...@gmail.com] >Sent: Wednesday, March 02, 2011 11:25 >To: beginners@perl.org >Subject: Re: Testing File Contents > >> # Untested >> use strict; >> use warnings; >> open my $fh, '<'

Re: Testing File Contents

2011-03-02 Thread shawn wilson
On Mar 2, 2011 4:47 PM, "Uri Guttman" wrote: > > > "sw" == shawn wilson writes: > > sw> On Wed, Mar 2, 2011 at 3:37 PM, Uri Guttman wrote: > >> > "M" == Matt writes: > >> > >> 2 lines will do it: > >> > >> use File::Slurp ; > >> > >> unless( read_file( $file ) =~ /$whatever/ )

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
> "sw" == shawn wilson writes: sw> On Wed, Mar 2, 2011 at 3:37 PM, Uri Guttman wrote: >> > "M" == Matt writes: >> >> 2 lines will do it: >> >> use File::Slurp ; >> >> unless( read_file( $file ) =~ /$whatever/ ) { >> >> # do something >> } >> >> >> what

Re: Testing File Contents

2011-03-02 Thread shawn wilson
On Wed, Mar 2, 2011 at 3:37 PM, Uri Guttman wrote: > > "M" == Matt writes: > > 2 lines will do it: > > use File::Slurp ; > >unless( read_file( $file ) =~ /$whatever/ ) { > ># do something >} > > > what's better about File::Slurp than just doing: my( $file, $

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
> "M" == Matt writes: M> I am looking for a simple way to test if a file does not contain a M> string. This is on a linux box. M> if myfile does not contain mystring { M> #do_something; M> } M> The file is basically a list of names and I want to test that a M> certain na

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
> "BFY" == Brian F Yulga writes: BFY> My apologies if I'm beating a dead horse here, but I'm new to Perl and BFY> thought of a slightly different approach: BFY> my $searchrx = qr/whatever/; # or q/whatever/ if you don't need regexp BFY> @ARGV or die qq/you didn't specify a filenam

RE: Testing File Contents

2011-03-02 Thread Ken Slater
>From: Brian F. Yulga [mailto:byu...@langly.dyndns.org] >On Wed, 2 Mar 2011, Matt wrote: > > The easiest way in my opinion is to use the 'grep' function like this: > > > > my $searchstring="whatever"; > > open CFG, '<', $_file || die("could not open file: $_file!"); my > > @data=; close CFG; if

Re: Testing File Contents

2011-03-02 Thread Brian F. Yulga
On Wed, 2 Mar 2011, Matt wrote: > > The easiest way in my opinion is to use the 'grep' function like this: > > > > my $searchstring="whatever"; > > open CFG, '<', $_file || die("could not open file: $_file!"); > > my @data=; > > close CFG; > > if ( grep /$searchstring/i, @data ) { > >  print "$se

Re: Testing File Contents

2011-03-02 Thread Matt
> The easiest way in my opinion is to use the 'grep' function like this: > > my $searchstring="whatever"; > open CFG, '<', $_file || die("could not open file: $_file!"); > my @data=; > close CFG; > if ( grep /$searchstring/i, @data ) { >  print "$searchstring found\n"; > } > This sorta worked. Ne

Re: Testing File Contents

2011-03-02 Thread Matt
> # Untested > use strict; > use warnings; > open my $fh, '<', my_file; > while(<$fh>){ >     if ($_ !~ /my_string/) { >         # Do something >     } > } This triggers on EVERY line of the file that does not contain the string. I just want to trigger once if its no where in the file. > The ot

AW: Testing File Contents

2011-03-02 Thread Christian Marquardt
ng found\n"; } If you negate the grep like this: @data = grep !/$searchstring/i, @data; ... you can remove the searchstring from your array (file-text). best regards Christian Von: Matt [lm7...@gmail.com] Gesendet: Mittwoch, 2. März 2011 18:55 Bis: be

Re: Testing File Contents

2011-03-02 Thread Parag Kalra
On Wed, Mar 2, 2011 at 10:11 AM, Parag Kalra wrote: Sorry for the top post. I should have done bottom post. :( # Untested > use strict; > use warnings; > > open my $fh, '<', my_file; > while(<$fh>){ > if ($_ !~ /my_string/) { > # Do something > } > } > > The other way would be on

Re: Testing File Contents

2011-03-02 Thread Parag Kalra
# Untested use strict; use warnings; open my $fh, '<', my_file; while(<$fh>){ if ($_ !~ /my_string/) { # Do something } } The other way would be on shell - # Untested grep my_string my_file if [ $? -eq 1 ] then echo "Do something" fi ~Parag On Wed, Mar 2, 2011 at 9:55 AM,

Testing File Contents

2011-03-02 Thread Matt
I am looking for a simple way to test if a file does not contain a string. This is on a linux box. if myfile does not contain mystring { #do_something; } The file is basically a list of names and I want to test that a certain name is not in there. Is there an easy way to do that? -- To un

Re: Bit testing

2010-11-14 Thread C.DeRykus
On Nov 14, 1:11 am, shlo...@iglu.org.il (Shlomi Fish) wrote: > Hi Charles, > > On Sunday 14 November 2010 01:47:36 C.DeRykus wrote: > > > On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote: > > Not lots shorter but you could use a closure to hide > > the calculation: > > > my $mask; > > for

Re: Bit testing

2010-11-14 Thread Chap Harrison
On Nov 14, 2010, at 4:36 AM, C.DeRykus wrote: > And now it seems a little bit > inelegant to redefine the closure each time through > the loop. > > > for my $flags ( ... ) { > my $mask = sub { return ($flags & $_[0]) == $_[0] }; > given( $flags ) { > when ( $mask->($one_a

Re: Bit testing

2010-11-14 Thread C.DeRykus
On Nov 13, 3:47 pm, dery...@gmail.com ("C.DeRykus") wrote: > On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote: > > > > > I'm almost embarrassed to ask this, but I can't figure out a simple way to > > construct a switch ('given') state

Re: Bit testing

2010-11-14 Thread Shlomi Fish
Hi Charles, On Sunday 14 November 2010 01:47:36 C.DeRykus wrote: > On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote: > Not lots shorter but you could use a closure to hide > the calculation: > > my $mask; > for my $flags ( ... ) { > $mask = sub { return ($flags & $_[0]) == $_[0] } >

Re: Bit testing

2010-11-13 Thread C.DeRykus
On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote: > I'm almost embarrassed to ask this, but I can't figure out a simple way to > construct a switch ('given') statement where the 'when' clauses involve > bit-testing. > > Here's the onl

Re: Bit testing

2010-11-11 Thread Uri Guttman
>>>>> "CH" == Chap Harrison writes: CH> I'm almost embarrassed to ask this, but I can't figure out a CH> simple way to construct a switch ('given') statement where the CH> 'when' clauses involve bit-testing. Here's the

Bit testing

2010-11-11 Thread Chap Harrison
I'm almost embarrassed to ask this, but I can't figure out a simple way to construct a switch ('given') statement where the 'when' clauses involve bit-testing. Here's the only way I've figured out to build a switch statement that does the trick. It see

RE: testing tcp connection

2010-09-01 Thread Kammen van, Marco, Springer SBM NL
-Original Message- From: Thomas Bätzler [mailto:t.baetz...@bringe.com] Sent: Wednesday, September 01, 2010 8:57 AM To: beginners@perl.org Cc: Kammen van, Marco, Springer SBM NL Subject: AW: testing tcp connection >>Kammen van, Marco, Springer SBM NL asked: >> I have a

AW: testing tcp connection

2010-08-31 Thread Thomas Bätzler
Kammen van, Marco, Springer SBM NL asked: > I have an issue when something goes wrong with the client that's trying > to connect. > > 9 out of 10 times this works fine, but there are odd situations where > $clientip doesn't get filled in, which leaves me with a connection I > can't do anything wi

testing tcp connection

2010-08-31 Thread Kammen van, Marco, Springer SBM NL
Hi All, I have an issue when something goes wrong with the client that's trying to connect. 9 out of 10 times this works fine, but there are odd situations where $clientip doesn't get filled in, which leaves me with a connection I can't do anything with... I tried to use close($client) to ju

Re: testing if divisible by?

2010-05-03 Thread Philip Potter
ession $x > > And there's the rub: "number" ne "integer". > > % is fine if you're only interested in integers, but if you want to > compare other numbers use fmod() from POSIX.pm: > >    perl -MPOSIX -wle 'print POSIX::fmod(35, 17.5)' fmod is

Re: testing if divisible by?

2010-05-03 Thread Jay Savage
On Sat, May 1, 2010 at 7:45 AM, Philip Potter wrote: > On 1 May 2010 12:15, Paul wrote: >> Hello all.  How can I test to see if a number is divisible by say, 40? >> Thanks. > > Use the modulo operator %. Given integers $x and $y, the expression $x > % $y gives the remainder when $x is divided by

Re: testing if divisible by?

2010-05-01 Thread Uri Guttman
> "JLP" == Jamie L Penman-Smithson writes: JLP> On Sat, 2010-05-01 at 07:15 -0400, Paul wrote: >> Hello all. How can I test to see if a number is divisible by say, 40? JLP> Use the modulo operator: JLP> my $a = 40; JLP> my $b = 1; JLP> if ($a % $b == 0) { no need for the ==

Re: testing if divisible by?

2010-05-01 Thread Jamie L. Penman-Smithson
On Sat, 2010-05-01 at 07:15 -0400, Paul wrote: > Hello all. How can I test to see if a number is divisible by say, 40? Use the modulo operator: my $a = 40; my $b = 1; if ($a % $b == 0) { print "$b is divisible by $a\n"; } -j -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Re: testing if divisible by?

2010-05-01 Thread Philip Potter
On 1 May 2010 12:15, Paul wrote: > Hello all.  How can I test to see if a number is divisible by say, 40? > Thanks. Use the modulo operator %. Given integers $x and $y, the expression $x % $y gives the remainder when $x is divided by $y. As a result, if (and only if) $x is exactly divisible by $y

Re: testing if divisible by?

2010-05-01 Thread Shawn H Corey
Paul wrote: Hello all. How can I test to see if a number is divisible by say, 40? Thanks. See `perldoc perlop` and search for /Multiplicative Operators/ Read the part about the % operator. -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization a

testing if divisible by?

2010-05-01 Thread Paul
Hello all. How can I test to see if a number is divisible by say, 40? Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Testing with Perl and Selenium RC

2010-03-12 Thread Bob McConnell
Does anyone here know where I can find information about using Perl to run tests with Selenium Remote Control? There is no Perl specific information in their documentation or SDK and they don't appear to have any Perl developers involved in the project any more. I pasted together some of my notes i

RE: Testing with Selenium

2009-09-23 Thread Bob McConnell
From: Steve Bertrand > Steve Bertrand wrote: > > Bob McConnell wrote: >>> >>> I have begun the task of automating functional tests for some of our web >>> servers. I have had some success using Selenium IDE in Firefox to >>> capture input sequences, exporting them to Perl scripts, then using the >>

Re: Testing with Selenium

2009-09-22 Thread Paul Johnson
On Tue, Sep 22, 2009 at 02:12:31PM -0400, Bob McConnell wrote: > Good morning, > > I have begun the task of automating functional tests for some of our web > servers. I have had some success using Selenium IDE in Firefox to > capture input sequences, exporting them to Perl scripts, then using the

Re: Testing with Selenium

2009-09-22 Thread Steve Bertrand
Steve Bertrand wrote: > Bob McConnell wrote: >> Good morning, >> >> I have begun the task of automating functional tests for some of our web >> servers. I have had some success using Selenium IDE in Firefox to >> capture input sequences, exporting them to Perl scripts, then using the >> Se remote c

Re: Testing with Selenium

2009-09-22 Thread Steve Bertrand
Bob McConnell wrote: > Good morning, > > I have begun the task of automating functional tests for some of our web > servers. I have had some success using Selenium IDE in Firefox to > capture input sequences, exporting them to Perl scripts, then using the > Se remote control server to execute them

Testing with Selenium

2009-09-22 Thread Bob McConnell
Good morning, I have begun the task of automating functional tests for some of our web servers. I have had some success using Selenium IDE in Firefox to capture input sequences, exporting them to Perl scripts, then using the Se remote control server to execute them. But I have run into one minor p

Re: Testing a scalier for two possible values at once

2009-05-13 Thread John W. Krahn
Adam Jimerson wrote: I need to test a scalier to see if its value is not two possibilities, because this test is being done inside a while loop I can not use an elsif statement without things getting ugly. I have tried it like this if ($scalier nq 'A') || ($scalier nq 'B') { but that just gave

Re: Testing a scalier for two possible values at once

2009-05-13 Thread Paul Johnson
On Wed, May 13, 2009 at 11:25:40AM +0200, Alexander Koenig wrote: > You wrote on 05/13/2009 02:17 AM: > > I need to test a scalier to see if its value is not two possibilities, > > because this test is being done inside a while loop I can not use an elsif > > statement without things getting ugly

Re: Testing a scalier for two possible values at once

2009-05-13 Thread Alexander Koenig
You wrote on 05/13/2009 02:17 AM: > I need to test a scalier to see if its value is not two possibilities, > because this test is being done inside a while loop I can not use an elsif > statement without things getting ugly. I have tried it like this if > ($scalier nq 'A') || ($scalier nq 'B')

Testing a scalier for two possible values at once

2009-05-13 Thread Adam Jimerson
I need to test a scalier to see if its value is not two possibilities, because this test is being done inside a while loop I can not use an elsif statement without things getting ugly. I have tried it like this if ($scalier nq 'A') || ($scalier nq 'B') { but that just gave me a syntax error wh

Re: disk performance or destructive testing

2008-12-20 Thread Yogesh Sawant
On Dec 17, 1:31 am, ben.pe...@gmail.com (Ben Perl) wrote: > Does anyone know any perl module for validating or do some desctructive > testing on disks on Linux platform? > found a few constructive ones, but nothing that would be destructive. i doubt that you would find any at CPAN. che

disk performance or destructive testing

2008-12-16 Thread ben perl
Does anyone know any perl module for validating or do some desctructive testing on disks on Linux platform? Thanks, -Ben

Unit testing

2008-08-22 Thread Vyacheslav Karamov
Hi All! I need to add unit tests to my project which I will start soon. I'm using latest ActivePerl in Win32 (because I have to) and I installed Test::Unit::Lite through ppm.bat. But! When I tried to run example test: #!/usr/bin/perl -w use strict; use warnings; use File::Basename; use File

Testing for a condition immediately after require

2008-06-06 Thread Travis Thornhill
I want to be able to tag a module with one or more tags that can be tested for after requiring it.   require 'module';   Any ideas on the best way to accomplish this?   Thanks in advance  

Re: Testing an array for a match

2008-04-10 Thread itshardtogetone
Hi, How about this :- foreach (@Treasures){ if ($_=~ /:1:2:3:/){ print "do your stuffs here\n": } } - Original Message - From: "Lou Hernsen" <[EMAIL PROTECTED]> To: ; <[EMAIL PROTECTED]> Sent: Thursday, April 10, 2008 1:07 AM Subje

Re: Testing an array for a match

2008-04-10 Thread Jeff Pang
On Thu, Apr 10, 2008 at 1:07 AM, Lou Hernsen <[EMAIL PROTECTED]> wrote: > Hallo > > I have an array > @Treasures > and I want to match anywhere in it for > /:1:2:3:/ > can I > if (@Treasures =~ /:1:2:3:/){} > or do i have to change (@Treasures to $Treasures and then > $Treasures = @Treasure

Testing an array for a match

2008-04-10 Thread Lou Hernsen
Hallo I have an array @Treasures and I want to match anywhere in it for /:1:2:3:/ can I if (@Treasures =~ /:1:2:3:/){} or do i have to change (@Treasures to $Treasures and then $Treasures = @Treasures ; if ($Treasures =~ /:1:2:3:/){} Just thought I'd ask first, I have to take mother in law to Dr.

Re: testing Non_SOAP webservices

2008-02-26 Thread Jenda Krynicky
From: "perl pra" <[EMAIL PROTECTED]> > Hi gurus, > > I need to test non-SOAP webservices.Can anybody tell how could i do that in > perl. > > basically i need to send the following xml file as pay load to the url. Have a look at the LWP modules. You'll need either LWP::Simple or LWP::UserAgent.

testing Non_SOAP webservices

2008-02-26 Thread perl pra
Hi gurus, I need to test non-SOAP webservices.Can anybody tell how could i do that in perl. basically i need to send the following xml file as pay load to the url. - http

Re: testing for a file type

2007-12-20 Thread Chas. Owens
On Dec 19, 2007 7:01 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote: snip > I did not install it yet so I can't check but I think you have it > wrong. According to the docs you point to > >@ARGV ~~ /\.mdb\z/ > > is equivalent to > >grep /\.mdb\z/, @ARGV > > which is true whenever at least one

Re: testing for a file type

2007-12-19 Thread Jenda Krynicky
From: "Chas. Owens" <[EMAIL PROTECTED]> > On Dec 18, 2007 4:49 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > snip > > if (grep { not /\.mdb\z/ } @ARGV) { > >print "All parameters must be MDB files\n"; > >exit; > > } > snip > > Or in Perl 5.10, coming to stores near you soon*, you can use the

Re: testing for a file type

2007-12-19 Thread Chas. Owens
On Dec 18, 2007 4:49 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: snip > if (grep { not /\.mdb\z/ } @ARGV) { >print "All parameters must be MDB files\n"; >exit; > } snip Or in Perl 5.10, coming to stores near you soon*, you can use the smart match operator: @ARGV ~~ /\.mdb\z/ or die "All

Re: testing for a file type

2007-12-18 Thread Rob Dixon
goldtech wrote: Hi, If I have: ... foreach (@ARGV) { print "do something only to .mdb files"; } I could use File::Basename's fileparse and test for the file extension and put a big if statement around or in the foreach loop. So if a user puts a non .mdb file argument on the cmd line it won

Re: testing for a file type

2007-12-18 Thread Ankur Gupta
On Dec 18, 2007 10:08 PM, goldtech <[EMAIL PROTECTED]> wrote: > Hi, > > If I have: > > ... > foreach (@ARGV) { >print "do something only to .mdb files"; > } > > I could use File::Basename's fileparse and test for the file extension > and put a big if statement around or in the foreach loop. So

testing for a file type

2007-12-18 Thread goldtech
Hi, If I have: ... foreach (@ARGV) { print "do something only to .mdb files"; } I could use File::Basename's fileparse and test for the file extension and put a big if statement around or in the foreach loop. So if a user puts a non .mdb file argument on the cmd line it won't process and pri

Re: testing if hardware is avalible

2007-07-20 Thread Chas Owens
On 7/20/07, Gregory Machin <[EMAIL PROTECTED]> wrote: Hi can you advise on the best way test if a usb modem is plugged in ? I though about checking if the file/node /dev/ttyACM0 is present, as it's created when the device is plugged in using open (TEST, "/dev/tty/ACM0"); but just concecned if i d

Re: testing if hardware is avalible

2007-07-20 Thread Tom Phoenix
On 7/19/07, Gregory Machin <[EMAIL PROTECTED]> wrote: can you advise on the best way test if a usb modem is plugged in ? I'd look at the socket. But if you're trying to do this via Perl, the best answer is "the same way you'd do it via C, INTERCAL, or any other language." In other words, you m

testing if hardware is avalible

2007-07-19 Thread Gregory Machin
Hi can you advise on the best way test if a usb modem is plugged in ? I though about checking if the file/node /dev/ttyACM0 is present, as it's created when the device is plugged in using open (TEST, "/dev/tty/ACM0"); but just concecned if i do this while the device is acitive it will cause it to

Re: DBD::Oracle for perl testing issues

2007-07-05 Thread Tom Phoenix
On 7/5/07, Dan King <[EMAIL PROTECTED]> wrote: I am attempting to install DBD::Oracle for Perl. I am having some difficulties though. During the make test procedure a number of my tests fail. One of them is the 10general.t test. It fails on lines 31 and 32 which has is system("exit 1;"), 1<<8,

DBD::Oracle for perl testing issues

2007-07-05 Thread Dan King
I am attempting to install DBD::Oracle for Perl. I am having some difficulties though. During the make test procedure a number of my tests fail. One of them is the 10general.t test. It fails on lines 31 and 32 which has is system("exit 1;"), 1<<8, 'system exit 1 should return 256'; is system("exi

Re: testing return values

2007-04-22 Thread Rob Dixon
Mike Lesser wrote: Hiya. I'm looking for the correct Perl style for testing and storing a return value in a control statement. The solution in any other language is pretty obvious, but I get the distinct impression that there's a 'right' way in Perl... Let's sa

Re: testing return values

2007-04-22 Thread yitzle
rrect Perl style for testing and storing a return value in a control statement. The solution in any other language is pretty obvious, but I get the distinct impression that there's a 'right' way in Perl... Let's say I want to test a scalar returned from a subroutine, and also ke

testing return values

2007-04-22 Thread Mike Lesser
Hiya. I'm looking for the correct Perl style for testing and storing a return value in a control statement. The solution in any other language is pretty obvious, but I get the distinct impression that there's a 'right' way in Perl... Let's say I want to test

Re: Need help Win#2 Directory Walk and testing for file access

2006-09-12 Thread John W. Krahn
Gallagher, Tim F (NE) wrote: > I need to move 3TB of data to a new SAN. I have to make sure that I > have the correct tights to move the data so I want to test my data > before the move. I want to walk the data and see if I have access to > all the files. I am not sure how to test the files to s

Re: Need help Win#2 Directory Walk and testing for file access

2006-09-12 Thread D. Bolliger
Gallagher, Tim F (NE) am Dienstag, 12. September 2006 20:39: > I need to move 3TB of data to a new SAN. I have to make sure that I > have the correct tights to move the data so I want to test my data > before the move. I want to walk the data and see if I have access to > all the files. I am not

Need help Win#2 Directory Walk and testing for file access

2006-09-12 Thread Gallagher, Tim F \(NE\)
I need to move 3TB of data to a new SAN. I have to make sure that I have the correct tights to move the data so I want to test my data before the move. I want to walk the data and see if I have access to all the files. I am not sure how to test the files to see if I have access or not. I don't

RE: How to use Perl for API testing

2006-07-10 Thread Jason Trebilcock
> -Original Message- > From: Suja Emmanuel [mailto:[EMAIL PROTECTED] > Sent: Sunday, July 09, 2006 10:16 PM > To: beginners@perl.org > Subject: How to use Perl for API testing > > > Hi, > > I want to use PERL for API testing, i.e., I want to

RE: How to use Perl for API testing

2006-07-10 Thread Timothy Johnson
Are you testing on IE? There is an Win32::IEAutomation module that should be able to handle what you want if IE is the browser you want to test. -Original Message- From: Suja Emmanuel [mailto:[EMAIL PROTECTED] Sent: Sunday, July 09, 2006 10:16 PM To: beginners@perl.org Subject: How

How to use Perl for API testing

2006-07-10 Thread Suja Emmanuel
Hi, I want to use PERL for API testing, i.e., I want to call different URLs through the browser. I am new to Perl. Can you help me to write a script to call many URLs through browser. Thanks in advance, Suja Emmanuel. The information contained in, or attached to, this e

Re: How to use Perl for API testing

2006-07-10 Thread Matt Johnson
, I want to use PERL for API testing, i.e., I want to call different URLs through the browser. How much is possin The information contained in, or attached to, this e-mail, contains confidential information and is intended solely for the use of the individual or entity to whom they are

RE: How to use Perl for API testing

2006-07-10 Thread Jeff Peng
Have you took a look at CPAN?for example,LWP::UserAgent. I want to use PERL for API testing, i.e., I want to call different URLs through the browser. How much is possin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <h

How to use Perl for API testing

2006-07-10 Thread Suja Emmanuel
Hi, I want to use PERL for API testing, i.e., I want to call different URLs through the browser. How much is possin The information contained in, or attached to, this e-mail, contains confidential information and is intended solely for the use of the individual or entity to

RE: testing perl

2006-01-08 Thread Owen Cook
On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: > I want to know how to use perl -d Try perldoc -q debug - Found in /usr/share/perl/5.8/pod/perlfaq3.pod How do I debug my Perl programs? lots more Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

RE: testing perl

2006-01-08 Thread Chris Devers
On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: > I want to know how to use perl -d perldoc perldebug -- Chris Devers DO NOT LEAVE IT IS NOT REAL -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: testing perl

2006-01-08 Thread Saurabh_Agarwal
I want to know how to use perl -d -Original Message- From: Owen Cook [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 10:51 AM To: Saurabh_Agarwal Cc: beginners@perl.org Subject: Re: testing perl On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: > How can we test our Perl scr

Re: testing perl

2006-01-08 Thread Chris Devers
On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: > How can we test our Perl script? We can test our Perl script carefully. -- Chris Devers DO NOT LEAVE IT IS NOT REAL -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: testing perl

2006-01-08 Thread Owen Cook
On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: > How can we test our Perl script? At the command prompt run #perl -c script.pl If there are no errors, it compiles ok If there are errors, fix them then run #perl script.pl and see if your logig is correct HTH Owen -- To unsubscribe, e-mai

testing perl

2006-01-08 Thread Saurabh_Agarwal
How can we test our Perl script? DISCLAIMER: This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forward

Re: Can we do gui testing using Perl

2005-11-15 Thread Jay Savage
On 11/15/05, Santosh Reddy <[EMAIL PROTECTED]> wrote: > Hi All, > > Can we do GUI testing of applications using Perl. Like we do using > winrunner. If can, please help me in getting the details of it. > > Thanks > Santosh Sure. Any particular GUI you had in mind? An

RE: Can we do gui testing using Perl

2005-11-15 Thread Daniel Kurtz
ting. I'd give you the various SourceForge.net URLs, but our DNS servers are hosed today and I'm not having any luck getting to anything on SourceForge. -Original Message- From: Santosh Reddy [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 15, 2005 07:28 To: 'Perl Beginne

  1   2   3   4   >