RE: array population from system app call

2004-05-25 Thread Halkyard, Jim
To capture output you need the backticks my @output = `put your command here`; The return value of a system call is the return value of the program you call. See perldoc perlfaq8 for more info Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 25 May 2004

GD module and LD_LIBRARY_PATH problem

2004-05-12 Thread Halkyard, Jim
Hi all, I have a problem with the GD module on Solaris 5.8 using Perl 5.6.1. I have installed Perl to /usr/local/bin/perl and /usr/app/perl is a symlink to fit in with certain conventions round here. When compiling the GD module it asked me where libgd was installed, and I told it - /usr/loca

RE: Logical problem with small script??

2004-03-09 Thread Halkyard, Jim
-Original Message- From: Gordon Low [mailto:[EMAIL PROTECTED] Sent: 09 March 2004 08:29 To: [EMAIL PROTECTED] Subject: Logical problem with small script?? Wondered if anyone can throw some light on why this script won't act properly. Wrote it to convert a string using a ceaser cipher f

RE: Passing array as First argument

2004-03-03 Thread Halkyard, Jim
Hi Malik, If you pass a reference to the array as the first argument as below you can keep the array separate from the other arguments you are passing. @abc = qw(1 2 3); $x = 4; $y = 5; testsub([EMAIL PROTECTED], $x, $y); sub testsub($$$) { ($abc, $x, $y) = @_; print "Array @$abc\n";

RE: : Help with extracting text

2003-12-31 Thread Halkyard, Jim
Hi Will, Just a couple of comments on the script you sent. This is your script with some minor changes. $infile = "zary_necheva_data.txt"; open(INFILE, $infile) or die "Death $!"; while( $line = ){ $lpos = index($line,"|"); # Your line will capture the first five chars, but in the sample

perl -v produces different output each time

2003-10-02 Thread Halkyard, Jim
Hi all, May I start by thanking all the people who have helped me in the past, and I hope you can help me with this one. I have a Solaris 5.8 server with a version of Perl provided as part of Rational ClearCase, and I am getting very strange errors. Sometimes scripts fail when use'ing Getopt::L

RE: packages object oriented

2003-09-12 Thread Halkyard, Jim
Have a look at Tom's Object Oriented Tutorial man perltoot or perldoc perltoot Jim -Original Message- From: Eric Walker [mailto:[EMAIL PROTECTED] Sent: 12 September 2003 15:33 To: perlgroup Subject: packages object oriented Does anyone have a good hold of how to do object oriented pr

RE: I'm about to lose my Perl Virginty...

2003-05-31 Thread Halkyard, Jim
The O'Reilly series of books are very good and there are a few other books available here http://learn.perl.org/library/ O'Reilly books include: Learning Perl Learning Perl on Win32 systems Programming Perl Perl Cookbook Advanced Perl Programming And don't forget your Perl distribution comes w

RE: accessing the string from system("ls -al") / browse dir scri pt

2003-04-06 Thread Halkyard, Jim
@ls = `la -al`; will do it. $ls = system("ls -al"); will save the exit status of the command, rather than the output. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 06 April 2003 12:01 To: [EMAIL PROTECTED] Subject: accessing the string from system("l

RE: If - Else What?

2002-11-26 Thread Halkyard, Jim
($a = 20) is an assignment so the if statement is testing the success of the assignment, not a comparison - not what you want here. Change it to ($a == 20), this will test numerically whether $a contains 20. eq can be used for string comparisons Jim -Original M

RE: random string

2002-11-25 Thread Halkyard, Jim
Yes, I started with 'Learning Perl' as a complete novice as I'm sure many other people have. There are lots of well explained examples, a test yourself questions section at the end of each chapter. Sample answers are provided and discussed in Appendix A. Jim -Original Message- From: '[

RE: random string

2002-11-25 Thread Halkyard, Jim
You are missing a semi-colon at the end of line 2, and remove the comma between the filehandle and $string in line 6. That should sort your problems. The Perl Cookbook is one of series of books on Perl published by O'Reilly. www.oreilly.com, generally well respected and very popular. If you sta