Re: Format Output

2007-09-18 Thread Spiros Denaxas
On Sep 18, 12:57 am, [EMAIL PROTECTED] (Chas Owens) wrote: > On 9/17/07, VUNETdotUS <[EMAIL PROTECTED]> wrote:> I print some output in > PERL. It is data in 3 columns. I use \t to add > > a tab space to make a column. > > However, \t may not produce the desired result. If the value is short > > in

Re: qtp integration with perl

2007-09-18 Thread Chas Owens
On 9/18/07, Siva Prasad <[EMAIL PROTECTED]> wrote: snip > Is there any way that I can call QTP from perl. snip http://www.softwareinquisition.com/2006/08/integrating-qtp-with-non-mercury-products-some-code -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

Re: qtp integration with perl

2007-09-18 Thread John W. Krahn
Chas Owens wrote: On 9/18/07, Siva Prasad <[EMAIL PROTECTED]> wrote: snip Is there any way that I can call QTP from perl. snip http://www.softwareinquisition.com/2006/08/integrating-qtp-with-non-mercury-products-some-code Nobody expects the software inquisition!!! John -- Perl isn't a tool

perl default variable question

2007-09-18 Thread Ryan Moszynski
hi, i'm using a perl script i found to change the names of batches of files. The program works as is but it's giving me a weird warning. I'm familiar with $_, but not $_[3]. Can someone explain what $_[3] is, and how i can get this script to stop throwning the warning? Thanks, Ryan i found the

Re: perl default variable question

2007-09-18 Thread Tom Phoenix
On 9/18/07, Ryan Moszynski <[EMAIL PROTECTED]> wrote: > i'm using a perl script i found to change the names of batches of > files. The program works as is but it's giving me a weird warning. > I'm familiar with $_, but not $_[3]. Can someone explain what $_[3] > is, and how i can get this script

Re: perl default variable question

2007-09-18 Thread Ryan Moszynski
On 9/18/07, Ryan Moszynski <[EMAIL PROTECTED]> wrote: > thanks, > > so i can just test to see if $_[3] > > exists > > and it kills the warning. > > On 9/18/07, Andrew Curry <[EMAIL PROTECTED]> wrote: > > @_ is the list of incoming parameters to a sub. So if you write a sub, you > > refer to the fir

Re: perl default variable question

2007-09-18 Thread Rob Coops
:-) $_ is basically the first variable of @_ which is the array that Perl is currently working on. So when your script is complaining about something in $_[3] what it is saying is that the 4th variable (Perl starts counting at 0) in the @_ array is making the compiler unhappy. I hope this helps

Re: perl default variable question

2007-09-18 Thread John W. Krahn
Ryan Moszynski wrote: hi, Hello, i'm using a perl script i found You should be careful with stuff you find lying around. to change the names of batches of files. The program works as is but it's giving me a weird warning. I'm familiar with $_, but not $_[3]. Can someone explain what $_[

How do you Create an array of a struct?

2007-09-18 Thread Travis Hervey
How do you Create an array of a struct in perl? Is this even possible in perl? So far I have... struct Carrier_Info => { name=> '$', abbrev => '$' }; ... my @carriers = Carrier_Info->new(); I have tried several different methods of loading data into the struct

Re: How do you Create an array of a struct?

2007-09-18 Thread John W. Krahn
Travis Hervey wrote: How do you Create an array of a struct in perl? Is this even possible in perl? So far I have... struct Carrier_Info => { name=> '$', abbrev => '$' }; That looks like a hash so: my %Carrier_Info = ( name=> '$', abbrev => '$',

Process ID

2007-09-18 Thread Somu
How do i find out the process id of any process. When we see the task manager in Windows, we can see the programs running in the PC. Is there any way to know the same with perl? Does process id of a program change each time the program is run? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

Re: How do you Create an array of a struct?

2007-09-18 Thread John W. Krahn
Travis Hervey wrote: From: John W. Krahn [mailto:[EMAIL PROTECTED] Travis Hervey wrote: How do you Create an array of a struct in perl? Is this even possible in perl? So far I have... struct Carrier_Info => { name=> '$', abbrev => '$' }; That looks like a hash so:

RE: Using Perl Win 32 AS 5.8.x - Anyway to find the File Create Date/Time

2007-09-18 Thread Wagner, David --- Senior Programmer Analyst --- WGO
> -Original Message- > From: Rob Dixon [mailto:[EMAIL PROTECTED] > Sent: Monday, September 17, 2007 18:42 > To: beginners@perl.org > Subject: Re: Using Perl Win 32 AS 5.8.x - Anyway to find the > File Create Date/Time > > Wagner, David --- Senior Programmer Analyst --- WGO wrote: > > >

Re: How do you Create an array of a struct?

2007-09-18 Thread Narthring
On Sep 18, 9:55 am, [EMAIL PROTECTED] (Travis Hervey) wrote: > How do you Create an array of a struct in perl? Is this even possible > in perl? > > So far I have... > > struct Carrier_Info => { > > name=> '$', > > abbrev => '$' > > }; > > ... > > my @carriers = Carrier_Info->n

Re: Process ID

2007-09-18 Thread Steve Bertrand
Somu wrote: > How do i find out the process id of any process. When we see the task > manager in Windows, we can see the programs running in the PC. Is > there any way to know the same with perl? Does process id of a program > change each time the program is run? #!/usr/bin/perl use warnings; use

Re: Process ID

2007-09-18 Thread Chas Owens
On 9/18/07, Somu <[EMAIL PROTECTED]> wrote: > How do i find out the process id of any process.When we see the task > manager in Windows, we can see the programs running in the PC. Is > there any way to know the same with perl? This is system dependent. For MS Windows machines try Win32::Process::

Re: How do you Create an array of a struct?

2007-09-18 Thread Rob Dixon
Travis Hervey wrote: How do you Create an array of a struct in perl? Is this even possible in perl? So far I have... struct Carrier_Info => { name=> '$', abbrev => '$' }; ... my @carriers = Carrier_Info->new(); I have tried several different methods of loa

Re: How do you Create an array of a struct?

2007-09-18 Thread Douglas Hunter
Travis Hervey wrote: How do you Create an array of a struct in perl? Is this even possible in perl? Yes, but it's not called a struct in perl. It's typically called a hash reference. `perldoc -q struct` is a good place to look first. After that I would look at `perldoc perlreftut`.

Re: How do you Create an array of a struct?

2007-09-18 Thread Rob Dixon
Narthring wrote: On Sep 18, 9:55 am, [EMAIL PROTECTED] (Travis Hervey) wrote: How do you Create an array of a struct in perl? Is this even possible in perl? So far I have... struct Carrier_Info => { name=> '$', abbrev => '$' }; ... my @carriers = Carrier_Info->new();

Re: qtp integration with perl

2007-09-18 Thread Vijayshree
On Sep 18, 11:45 am, [EMAIL PROTECTED] (Siva Prasad) wrote: > Hi Gurus, > > I have to develop a test harness that is used to do end-end testing of a > application. > > The gui test harness is already in place. Which is developed in QTP TOOL? > > The back end automation should be developed perl and

Re: Format Output

2007-09-18 Thread VUNETdotUS
On Sep 17, 7:57 pm, [EMAIL PROTECTED] (Chas Owens) wrote: > On 9/17/07, VUNETdotUS <[EMAIL PROTECTED]> wrote:> I print some output in > PERL. It is data in 3 columns. I use \t to add > > a tab space to make a column. > > However, \t may not produce the desired result. If the value is short > > in

Re: How do you Create an array of a struct?

2007-09-18 Thread Paul Lalli
On Sep 18, 10:55 am, [EMAIL PROTECTED] (Travis Hervey) wrote: > How do you Create an array of a struct in perl? You have to be more careful in your phrasing of your question. You're using the Class::Struct module without telling anyone you're using the Class::Struct module, so people are assuming

Re: Format Output

2007-09-18 Thread Chas Owens
On 9/18/07, VUNETdotUS <[EMAIL PROTECTED]> wrote: snip > I liked Text::Table idea but it is not supported on my machine. > Now I try printf but I came across a few problems. The sample above > produces a good result. However, when I implement according to my > needs, I cannot printf my multidimensi

RE: How do you Create an array of a struct?

2007-09-18 Thread Travis Hervey
Ah ha! I understand now! It took seeing it from several different angles but I get it now. I was assuming that I could make an array of the structs. But it seems in perl that in order to do so you make an instance of the struct within the element of a regular array since individual array elemen

CSV files column sort

2007-09-18 Thread Manoj
Hi List, I want to ping a list of IP address/hostnames and check backward compatibility. Can any one help me in doing this? I am new to perl. Thanks Manoj

Re: import CSV files in MYSQL

2007-09-18 Thread Ana
On Sep 3, 9:13 am, [EMAIL PROTECTED] (Ana) wrote: > On 31 ago, 22:35, [EMAIL PROTECTED] (Jm) wrote: > > > > > > > if you have access to the mysql client and server you don't need any > > modules, just use the "load data" sql command with all the requisite > > parameters. > > > if you need to make a

Listing files and their sizes

2007-09-18 Thread Telemachus Odysseos
Hi, I have read around and cannot seem to find an answer to this, and it's driving me a bit nuts. I have a small script that I am trying to use to list the items in a directory and the size of the items. The script works perfectly if I run it in the directory itself, but if the script is somewhere

Perl/Tk Help

2007-09-18 Thread CM Analyst
Hi All, I hope this is still the correct forum to get help with Perl/Tk... My goal is display the time in the GUI window but it doesn't do it quite how I want it to. In the GUI, I want the time to display with the sleep call (set to 1). However, when I use the print statement and the value goe

Re: Listing files and their sizes

2007-09-18 Thread Dr.Ruud
"Telemachus Odysseos" schreef: > [...] it prints the filenames > but not the sizes. [...] perldoc -f readdir: "you'd better prepend the directory in question". > #!/usr/bin/perl Missing: use strict; use warnings; > opendir(CD,"/path/to/directory/here"); my $dir_name = "/path/to/dire

Re: CSV files column sort

2007-09-18 Thread Narthring
On Sep 18, 2:16 pm, [EMAIL PROTECTED] (Manoj) wrote: > Hi List, > > I want to ping a list of IP address/hostnames and check backward > compatibility. Can any one help me in doing this? I am new to perl. > > Thanks > Manoj The Net::Ping module will allow you to ping remote hosts. The documentation

Re: Listing files and their sizes

2007-09-18 Thread davidfilmer
On Sep 18, 1:59 pm, [EMAIL PROTECTED] (Telemachus Odysseos) wrote: > The script works > perfectly if I run it in the directory itself, but if the script is > somewhere else in my system, it prints the filenames but not the sizes. That's because readdir returns a plain filename. You need to eithe

Re: Listing files and their sizes

2007-09-18 Thread John W. Krahn
Telemachus Odysseos wrote: Hi, Hello, I have read around and cannot seem to find an answer to this, and it's driving me a bit nuts. I have a small script that I am trying to use to list the items in a directory and the size of the items. The script works perfectly if I run it in the directory

PERL/LDAPS

2007-09-18 Thread John Maverick
Hello, I am trying to use LDAPS in one of my perl script and not able to get all required modules to install. I am doing this on Windows machine. Can anyone share their experience if they managed to successfully install all required modules. Thank you, John.

Re: Listing files and their sizes

2007-09-18 Thread useperl-jeff
--- Telemachus Odysseos <[EMAIL PROTECTED]> wrote: > > #!/usr/bin/perl > > opendir(CD,"/path/to/directory/here"); > while ( $_ = readdir(CD)) { > next if $_ eq "." or $_ eq ".."; > print $_, " " x (30-length($_)); > print (-s $_ ); Here you need to specify the absolute

Getting error with make while installing the module

2007-09-18 Thread kilaru rajeev
Hi All, I am getting the following error while installing the module. Writing Makefile for Digest::SHA1 cp SHA1.pm blib/lib/Digest/SHA1.pm /crd/shared/perl/bin/perl /crdv8/shared/perl/lib/5.8.3/ExtUtils/xsubpp -typemap /crdv8/shared/perl/lib/5.8.3/ExtUtils/typemap -typemap typemap SHA1.xs > SHA1.

Re: Getting error with make while installing the module

2007-09-18 Thread useperl-jeff
--- kilaru rajeev <[EMAIL PROTECTED]> wrote: > > *cc* is installed at */usr/ucb/cc* but it is pointing to * > /opt/SUNWspro/bin/cc.* Please help me to make it point to the > /usr/bin/cc. > You may take a look at Makefile.PL and change something about the complier. But as a fast solution,how ab

RE: CSV files column sort

2007-09-18 Thread Manoj
I have a list of host names with me which I need to check if its alive and the Primary IP address of the box. I am struck up some of the host names where I could not find the fully qualified domain names. Is there a way to find the fully qualified names? I will use both the host name and IP on nsl