Re: hash problems

2003-12-13 Thread John W. Krahn
Jdavis wrote: > > Hello, Hello, > I have a script that gets items and corresponding price from a web > site. all goes well until i put the item and price in a hash. When i try > to print key and value from the hash it comes out all weired. Could some > one take a look and see what im doing wron

Getting the most recent file

2003-12-13 Thread Perl
I am trying to write some code to read the most recent log file in a directory. I wrote some code below. This works but I was wondering if there was a more efficient method to do this. Ideally I would like to include hours, minutes and seconds but that's not necessary at this point. --Paul fore

LDAPS and HTTPS not working with Unix

2003-12-13 Thread amol sarin
Hi I have 2 problems which are as listed below: 1.In the first instance i have to check whether the HTTPS service is running on a remote machine or not.The following is the code snippet for it: use LWP::UserAgent; my ($strHttpURL)='https://machinename; $ua = LWP::UserAgent->new; $req = HTTP::Requ

Re: Parentheses

2003-12-13 Thread Rob Dixon
R. Joseph Newton wrote: > > Rob Dixon wrote: > > > > Not sure which way you're leaning here. I never saw you as anti the 'it' > > variable $_? > > > > Rob > > I think its a matter of context, Rob. I agree 100%. But see later. > What I cringe at is seeing a default > variable being used in dense c

Re: Getting the most recent file

2003-12-13 Thread Rob Dixon
<[EMAIL PROTECTED]> wrote: > > I am trying to write some code to read the most recent log file in a > directory. I wrote some code below. This works but I was wondering if > there was a more efficient method to do this. Ideally I would like to > include hours, minutes and seconds but that's not nec

Re: LDAPS and HTTPS not working with Unix

2003-12-13 Thread Peter Scott
Make sure you have Crypt::SSLeay installed. -- Peter Scott http://www.perldebugged.com/ *** NEW *** http//www.perlmedic.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-13 Thread Jerry Rocteur
Hi, I'm trying to be a good boy and use strict and warnings .. The more I do, the more I feel I'm wasting so much time and should become productive, my code looks full of 'my', I could understand the requirement inside a sub routing but in the main code it gives me the willies. My DBI Perl is

Re: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-13 Thread Wiggins d'Anconia
Jerry Rocteur wrote: Hi, I'm trying to be a good boy and use strict and warnings .. The more I do, the more I feel I'm wasting so much time and should become productive, my code looks full of 'my', I could understand the requirement inside a sub routing but in the main code it gives me the wil

Re: IP question

2003-12-13 Thread drieux
On Dec 12, 2003, at 4:13 PM, Michael Sullivan wrote: Michael, I'm routing this back to the list so that more can share in it. The gateway IP address for my domain is 68.15.193.18, so could I say: when you say 'gateway IP address' is this like the address you are issued from an ISP? Hence your WA

Re: Parentheses

2003-12-13 Thread Wiggins d'Anconia
Rob Dixon wrote: R. Joseph Newton wrote: Rob Dixon wrote: Not sure which way you're leaning here. I never saw you as anti the 'it' variable $_? Rob I think its a matter of context, Rob. I agree 100%. But see later. What I cringe at is seeing a default variable being used in dense code. The m

Re: Move a file

2003-12-13 Thread Wiggins d'Anconia
Rob Dixon wrote: Wiggins D Anconia wrote: Depending on what is writing the files, aka another controllable program? I have had good luck with writing the file to a temporary location, usually with a dot on the front, then executing a move from that temp location to the real name. A move is usual

Re: Invoking multiple analyses

2003-12-13 Thread Wiggins d'Anconia
Amit Phatak wrote: I am currently invoking an ABAQUS (A finite element analysis package) analysis through perl using the command - system("/usr/local/bin/tcsh -c 'source /eng/local/lib/source/use -quiet abaqus; /eng/tools/abaqus/6.3/Commands/abaqus job=$input_file'"); where $input_file has a name

Re: Newbie question

2003-12-13 Thread Randal L. Schwartz
> "Michael" == Michael Sullivan <[EMAIL PROTECTED]> writes: Michael> Can anyone recommend any free Perl tutorials? I know almost nothing Michael> about what I'm doing, only that it looks somewhat like C++... Once you have the basics down, there are 198+ articles at www.stonehenge.com/merlyn/

Re: help looping through text file

2003-12-13 Thread Joel Newkirk
On Fri, 2003-12-12 at 15:59, John Fitzgerald wrote: > I need a list set like this: > IDdate > 3008 11/1/03 > 3008 11/1/03 > 3008 11/1/03 > 3010 12/1/03 > 3010 12/1/03 > > So I need repeating ID's, with the earliest date for > each ID. If the order of the data is preserved, I can > use ju

Re: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-13 Thread Rob Dixon
Jerry Rocteur wrote: > > I'm trying to be a good boy and use strict and warnings .. Well done! > The more I do, the more I feel I'm wasting so much time and should > become productive, my code looks full of 'my', I could understand the > requirement inside a sub routing but in the main code it gi

Re: could use an audit

2003-12-13 Thread Rob Dixon
James Edward Gray II wrote: > > On Dec 12, 2003, at 6:20 PM, Kenton Brede wrote: > > > I've cobbled some code together that will allow me to parse a file > > snarfing 4 lines which consist of server name and Daily output of > > bandwith usage. I've pasted an example of what I have at the bottom of

Re: could use an audit

2003-12-13 Thread John W. Krahn
Kenton Brede wrote: > > I've cobbled some code together that will allow me to parse a file > snarfing 4 lines which consist of server name and Daily output of > bandwith usage. I've pasted an example of what I have at the bottom of > this mail. If anyone would like to take the time to show me ho

Re: hash problems

2003-12-13 Thread jdavis
On Fri, 2003-12-12 at 23:58, John W. Krahn wrote: > Jdavis wrote: > > > > Hello, > > Hello, > > > I have a script that gets items and corresponding price from a web > > site. all goes well until i put the item and price in a hash. When i try > > to print key and value from the hash it comes out

Re: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-13 Thread R. Joseph Newton
Wiggins d'Anconia wrote: > More code showing specifically why I have been rambling about $_ in the > last couple of days. If you are going to shift off the argument list > why not just do it in the while loop when you are setting $_? Thanks, Wiggins, and keep on rambling. The point needs reiter

Re: help looping through text file

2003-12-13 Thread John W. Krahn
John Fitzgerald wrote: > > Hi, Hello, > I'm fairly new to Perl, and trying to do a simple > operation on a text file exported from excel. > ID Enrolled Extraneous Columns > 300805-Aug-03 > 300805-Aug-03 > 300805-Aug-03 > 300805-Aug-03 > 300824-Sep-03 > 300911

Re: Parentheses

2003-12-13 Thread R. Joseph Newton
Rob Dixon wrote: > > foreach (@lines) { # too many lines here > > } > > > > While the purpose of the above may bve totally incomprehesible, there is no > > question about what $_ is. <;:-o) > > One proviso here. I always feel very uncomfortable about explicitly assigning > to $_. As I implied

Re: could use an audit

2003-12-13 Thread drieux
On Dec 12, 2003, at 4:20 PM, Kenton Brede wrote: I've cobbled some code together that will allow me to parse a file snarfing 4 lines which consist of server name and Daily output of bandwith usage. [..] I'm not exactly a programming wonder and trying to learn. [..] Kent, As has been noted, james

Re: Parentheses

2003-12-13 Thread drieux
Thought I would propose one more argument on the 'importance' of parens and subs. While putting together I of course had my usual devolutions, because It is easier, for me, to put a RegEx in a function that I will call twice, th

Re: Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.

2003-12-13 Thread drieux
On Dec 13, 2003, at 10:01 AM, Wiggins d'Anconia wrote: [.. A decent template, any gurus have improvements? [..] my stock gag, looks like: my $opt = parse_cmd_line_options(); ... #--- # These are the Subs for the parse_cmd_line_options. #

Re: Win32::SerialPort to log file

2003-12-13 Thread drieux
On Dec 12, 2003, at 7:06 PM, [EMAIL PROTECTED] wrote: I'm trying to get a script to save a barcode scanner's output to a log file. [..] do you mean that you are using use Win32::SerialPort; # use strict; use warn

Split question

2003-12-13 Thread Perl
Hi, i am new to Perl. here is my question i have a character string like abc#def#ghi#jkl i want to split the string based on the delimiter # so that i get something like this : abc def ghi jkl But @temp = split(/#/, "abc#def#ghi#jkl") ; doesn't seem to work. am i do

Re: Split question

2003-12-13 Thread John W. Krahn
Perl wrote: > > Hi, Hello, >i am new to Perl. >here is my question > > i have a character string like abc#def#ghi#jkl > > i want to split the string based on the delimiter # so that i get > something like this : > > abc def ghi jkl > > But > > @temp = split(/#/, "ab

Re: Split question

2003-12-13 Thread Kenton Brede
On Sat, Dec 13, 2003 at 09:16:35PM -0800, Perl wrote: > Hi, >i am new to Perl. >here is my question > > i have a character string like abc#def#ghi#jkl > > i want to split the string based on the delimiter # so that i get > something like this : > > abc def ghi jkl > > Bu