Move a file

2003-12-12 Thread neill . taylor
I am writing a script which will poll a directory and then move any files in the directory to a new directory dependant upon its name. The problem I think I might have is that the script may try to pick a file that is still being copied into the directory whilst the application is still trying t

Re: Move a file

2003-12-12 Thread Rob Dixon
Neill Taylor wrote: > > I am writing a script which will poll a directory and then move any files > in the directory to a new directory dependant upon its name. > > The problem I think I might have is that the script may try to pick a file > that is still being copied into the directory whilst the

Re: counting down in a for

2003-12-12 Thread Rob Dixon
<[EMAIL PROTECTED]> wrote: > > At 20:45 11/12/2003, you wrote: > > >On Dec 11, 2003, at 11:49 AM, [EMAIL PROTECTED] wrote: > >[..] > >> there is probably a much better way of doing all this i am working on > >>the checkResults sub. > >>it should find the pollerAudit log created by the main process

Re: Pattern Match

2003-12-12 Thread Rob Dixon
Robert Brown wrote: > > R. Joseph Newton writes: > > When used consciously, with at least a general awareness of the processing > > load being invoked, regexes can do some really incredible things. > > Thanks! I especially appreciate the example you gave showing how to > trim both ends of a stri

String Date to apoch

2003-12-12 Thread Paul Kraus
How can I convert a date that is a string such as "12/12/03" to apoch so that I can then compare it to time and if its <= time do something. I can't give code because this is still a concept. But the check is that cron will scan a directory hourly or daily. Parse the filenames which are going to b

New Object Notation vs @{$hash{key}}

2003-12-12 Thread Paul Kraus
I think I am picking up some bad habits so maybe you guys can help. I currently use this notation @{$hash{key}} to access an array stored in a hash. I keep seeing posts that it is better to use an object like notation. Can I see some examples on how you would access the array or an element of an a

Database Paging using CGI Perl

2003-12-12 Thread Mallik
Dear Friends, I am using Informix database. I want to implement database paging concept on Informix using CGI Perl. Please provide me any sample code. Thanks in Advance, With Regards, Mallikarjun. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: String Date to apoch

2003-12-12 Thread Rob Dixon
Paul Kraus wrote: > > How can I convert a date that is a string such as "12/12/03" to apoch so > that I can then compare it to time and if its <= time do something. > I can't give code because this is still a concept. > > But the check is that cron will scan a directory hourly or daily. Parse > the

Re: Move a file

2003-12-12 Thread Wiggins d Anconia
> Neill Taylor wrote: > > > > I am writing a script which will poll a directory and then move any files > > in the directory to a new directory dependant upon its name. > > > > The problem I think I might have is that the script may try to pick a file > > that is still being copied into the dire

Re: String Date to apoch

2003-12-12 Thread Wiggins d Anconia
> How can I convert a date that is a string such as "12/12/03" to apoch so > that I can then compare it to time and if its <= time do something. > I can't give code because this is still a concept. > > But the check is that cron will scan a directory hourly or daily. Parse > the filenames which

RE: Parsing problem

2003-12-12 Thread Larry Sandwick
Normalizing is a term I understand, but the database does not, I do not think that was a term used when this database was *born* in the late 70's. Yes it is very old; I am not even going down that road. I believe the only way to normalize this is database is to take it out back to the shed and yes

Re: Database Paging using CGI Perl

2003-12-12 Thread Wiggins d Anconia
> Dear Friends, > > I am using Informix database. I want to implement > database paging concept on Informix using CGI Perl. > > Please provide me any sample code. > > Thanks in Advance, > This was recently discussed on beginners-cgi, you may want to reference that discussion here: http://gr

Re: New Object Notation vs @{$hash{key}}

2003-12-12 Thread Rob Dixon
Paul Kraus wrote: > > I think I am picking up some bad habits so maybe you guys can help. > > I currently use this notation @{$hash{key}} to access an array stored in > a hash. > I keep seeing posts that it is better to use an object like notation. > Can I see some examples on how you would access

Re: New Object Notation vs @{$hash{key}}

2003-12-12 Thread Wiggins d Anconia
> I think I am picking up some bad habits so maybe you guys can help. > > I currently use this notation @{$hash{key}} to access an array stored in > a hash. > I keep seeing posts that it is better to use an object like notation. > Can I see some examples on how you would access the array or an e

Re: Move a file

2003-12-12 Thread Rob Dixon
Wiggins D Anconia wrote: > > > Neill Taylor wrote: > > > > > > I am writing a script which will poll a directory and then move any > files > > > in the directory to a new directory dependant upon its name. > > > > > > The problem I think I might have is that the script may try to pick > a file > >

Re: New Object Notation vs @{$hash{key}}

2003-12-12 Thread Rob Dixon
Wiggins D Anconia wrote: > > > I think I am picking up some bad habits so maybe you guys can help. > > > > I currently use this notation @{$hash{key}} to access an array stored in > > a hash. > > I keep seeing posts that it is better to use an object like notation. > > Can I see some examples on ho

Question for this Group ... dont flame me :)

2003-12-12 Thread Jeff Westman
Question for this group. And please don't flame me for asking this. Often times one writes in, asking how to do something fairly trivial, such as a date conversion from a non-standard format, or doing something else not require too much overhead. When asked for advice, nine times out of ten, the

RE: Move a file

2003-12-12 Thread Tom Kinzer
A variation of Wiggins' approach is to pre or append the PID to the file name. This can potentially allow multiple processes of the same type to run simultaneously without stomping on each other while they are running and can aid in tracking down those production problems - assuming you are loggin

RE: New Object Notation vs @{$hash{key}}

2003-12-12 Thread Paul Kraus
> I wouldn't necessarily call it a bad habit as it does execute > properly, it just doesn't produce as readable of code... Rob > already covered -> well so I will just point you to some > "light" reading if you thirst for more... > > perldoc perlreftut > perldoc perlref > perldoc perldsc > per

Re: Question for this Group ... dont flame me :)

2003-12-12 Thread Daniel Staal
--As off Friday, December 12, 2003 7:25 AM -0800, Jeff Westman is alleged to have said: So, why is it that most of the solutions represented in this group tend to point to a CPAN module when the code for it isn't that hard (usually) to write? I'm not sure if using modules is a matter of "conven

RE: Question for this Group ... dont flame me :)

2003-12-12 Thread Tom Kinzer
Well, I'm a professional Perl developer. I have also been in your position before Jeff. I can say that it is just a "best practice" to always use a module. It's just smart to reuse modular code. 1) it saves building work 2) it's already tested 3) it's already documented 4) in many cases it's su

Re: Question for this Group ... dont flame me :)

2003-12-12 Thread Rob Dixon
Jeff Westman wrote: > > Question for this group. And please don't flame me for asking this. > > Often times one writes in, asking how to do something fairly trivial, > such as a date conversion from a non-standard format, or doing something > else not require too much overhead. When asked for adv

Re: String Date to apoch

2003-12-12 Thread Jeff 'japhy' Pinyan
On Dec 12, Paul Kraus said: >How can I convert a date that is a string such as "12/12/03" to apoch so >that I can then compare it to time and if its <= time do something. I suggest using the STANDARD module, Time::Local. It gives you a function called timelocal(), which takes six arguments: sec,

RE: Question for this Group ... dont flame me :)

2003-12-12 Thread Guay Jean-Sébastien
Hello Jeff, These answers are of course my own experience, but may be significant to understand the bigger picture. I reorder your points a bit in my reply :-) > So, why is it that most of the solutions represented > in this group tend to point to a CPAN module when > the code for it isn't that

RE: Question for this Group ... dont flame me :)

2003-12-12 Thread Tom Kinzer
btw Jeff, good post. I think this will stimulate a good conversation. This is a common problem with lots of different workarounds. Thanks. -Original Message- From: Jeff Westman [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 7:26 AM To: perl_help Subject: Question for this Gro

Re: Question for this Group ... dont flame me :)

2003-12-12 Thread Wiggins d Anconia
FLAME! FLAME! ;-)... > Question for this group. And please don't flame me for asking this. > > Often times one writes in, asking how to do something fairly trivial, > such as a date conversion from a non-standard format, or doing something > else not require too much overhead. The problem,

RE: Question for this Group ... dont flame me :)

2003-12-12 Thread Jeff Westman
Guay_Jean-Sébastien <[EMAIL PROTECTED]> wrote: > These answers are of course my own experience, but may be significant to > understand the bigger picture. I reorder your points a bit in my reply :-) No problem :) > > So, why is it that most of the solutions represented > > in this group tend t

Re: Parentheses

2003-12-12 Thread Rob Dixon
Paul Kraus wrote: > > Ok another question on perl then. When do you have to use () on a > function or sub call? Or in the new construct of an object. > I use then on everything since I don't better. Figure its safer to leave > them on then take them off. Very simply, if you've previously declared

Re: counting down in a for

2003-12-12 Thread drieux
On Dec 11, 2003, at 1:20 PM, [EMAIL PROTECTED] wrote: [..] Why not Open the directory with say opendir() and get the list of files in it? then use the readdir() and 'grep' type tricks: opendir(DIR, $some_dir) || die "can't opendir $some_dir: $!"; @today_files = grep {$_ =~ /^pollerAudit.$fileDa

RE: Question for this Group ... dont flame me :)

2003-12-12 Thread Guay Jean-Sébastien
> I don't know if this [specific] module is "standard" > or not, but it was already installed on the servers, > so I am guessing it is. I don't think it is, or at least it wasn't installed by doing a full install of ActiveState Perl 5.8 in my case. Perhaps the "real" Perl distribution differs fr

IP question

2003-12-12 Thread Michael Sullivan
I don't know much about Perl yet. I copied a website counter script off of htmlgoodies.com and I was wondering if it would be possible to modify the script so that it wouldn't add to the counter if the visitor was from my IP address. Is that possible, and if so how would I do it? -Michael Sulliva

Re: Parsing problem

2003-12-12 Thread drieux
On Dec 12, 2003, at 6:50 AM, Larry Sandwick wrote: [..] I thought it would be done with hashes and every time I get into hashes I get a headache. I do see that I have much to learn about Perl especially hashes. Ok, let's go back over what has been played so far. John has offered One way towards the

RE: Parentheses

2003-12-12 Thread Tom Kinzer
as a matter of style, i think always having them is nice for maintenance/readability. -Tom Kinzer -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 8:08 AM To: [EMAIL PROTECTED] Subject: Re: Parentheses Paul Kraus wrote: > > Ok another question

Re: Parentheses

2003-12-12 Thread Rob Dixon
Tom Kinzer wrote: > > as a matter of style, i think always having them is nice for > maintenance/readability. I may be wrong, but I think most Perl programmers would disagree. It may be nice for maintenance if your program is to be maintained by a herd of Prolog programmers, but readability is ce

Re: Parentheses

2003-12-12 Thread Wiggins d Anconia
> Tom Kinzer wrote: > > > > as a matter of style, i think always having them is nice for > > maintenance/readability. > > I may be wrong, but I think most Perl programmers would disagree. > > It may be nice for maintenance if your program is to be maintained > by a herd of Prolog programmers, b

Re: Parentheses

2003-12-12 Thread Rob Dixon
Wiggins D Anconia wrote: > > > Tom Kinzer wrote: > > > > > > as a matter of style, i think always having them is nice for > > > maintenance/readability. > > > > I may be wrong, but I think most Perl programmers would disagree. > > > > It may be nice for maintenance if your program is to be maintain

Re: Question for this Group ... dont flame me :)

2003-12-12 Thread drieux
On Dec 12, 2003, at 7:25 AM, Jeff Westman wrote: [..] p0: most of the cool arguments have been generally made. my kvetching here will therefore be the less cool stuff. So, installing a module is out-of-the-question. In my case, I am basically "stuck" with the perl [5.8] default libraries and module

Re: Question for this Group ... dont flame me :)

2003-12-12 Thread drieux
On Dec 12, 2003, at 8:23 AM, Guay Jean-Sébastien wrote: [..] Perhaps the "real" Perl distribution differs from ActiveState Perl on what modules it includes by default? [..] I think the OP has the 'imaginary' Perl distribution. Cold out of the wrappers the default installation for various vendor su

Re: Question for this Group ... dont flame me :)

2003-12-12 Thread drieux
On Dec 12, 2003, at 10:42 AM, drieux wrote: [..] Yes, and No. Again the presumption here is that we are discussing at the 'professional obligations level' and not at the academic/hobby level. [..] Drieux! You KankerousBoilOnTheBottomSideOfYourSithLord! That whole academic v. professional issue is

some doubt

2003-12-12 Thread Ajey Kulkarni
hi, How can i rename a file and check the size of file using perl? Also is there a way to call unix commands/system calls from perl?(Say i want to fstat() on a file and grab the stat struct results). Is there any way?? TIA -Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: IP question

2003-12-12 Thread drieux
On Dec 12, 2003, at 8:39 AM, Michael Sullivan wrote: I don't know much about Perl yet. I copied a website counter script off of htmlgoodies.com and I was wondering if it would be possible to modify the script so that it wouldn't add to the counter if the visitor was from my IP address. Is that

Re: Messing with Files [Was: some doubt]

2003-12-12 Thread Casey West
It was Saturday, December 13, 2003 when Ajey Kulkarni took the soap box, saying: : hi, : How can i rename a file and check the size of file using perl? Use the rename() function. rename( $oldfile, $newfile ); perldoc -f rename() Use the file test operators, particularly -s. my $size = -s

Re: some doubt

2003-12-12 Thread Rob Dixon
Ajey Kulkarni wrote: [some stuff] Before this gets lost as a subthread I'm reposting it. I hope I catch most potential responses. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

File Operations and System Calls in Perl (WAS: some doubt)

2003-12-12 Thread Tim Johnson
Okay, I'll give you a few pointers, but first, please use a more descriptive subject line and start a new message when you start a new thread. The Perl documentation is found by running perldoc. To find the answers to your questions, try checking out: perldoc -f stat perldoc -q extern perldoc -

Some Doubt

2003-12-12 Thread Rob Dixon
Ajey Kulkarni wrote: > > How can i rename a file and check the size of file using perl? > Also is there a way to call unix commands/system calls from perl?(Say i > want to fstat() on a file and grab the stat struct results). Is there any > way?? You can grab the size of a file using the -s operato

getting rid of whitespace at the beginning and end of a string

2003-12-12 Thread Dan Anderson
Is there a way to chomp all whitespace both at the beginning and end of a string? I was thinking of using a regexp like s[^\s*?][]sg and s[\s*?$][]sg; Is there a better way? (I'm thinking of PHP's trim function) -Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: Parentheses

2003-12-12 Thread drieux
On Dec 12, 2003, at 10:29 AM, Rob Dixon wrote: Tom Kinzer wrote: as a matter of style, i think always having them is nice for maintenance/readability. I may be wrong, but I think most Perl programmers would disagree. [..] ( (start flame) ( rob you spawn of (under nice) who (hates roundies)

RE: copying complex data structures

2003-12-12 Thread West, William M
>use Storable; >$arrayref_one = dclone( $arrayref_two ); > aha thanks :) it's those details that make a program so much easier to make.. i noticed another poster asking about reference notations- i think that this and Object Oriented programming have given me the most headaches on a co

Re: getting rid of whitespace at the beginning and end of a string

2003-12-12 Thread drieux
On Dec 12, 2003, at 11:51 AM, Dan Anderson wrote: Is there a way to chomp all whitespace both at the beginning and end of a string? I was thinking of using a regexp like s[^\s*?][]sg and s[\s*?$][]sg; Is there a better way? (I'm thinking of PHP's trim function) the traditional path is

Re: getting rid of whitespace at the beginning and end of a string

2003-12-12 Thread James Edward Gray II
On Dec 12, 2003, at 1:51 PM, Dan Anderson wrote: Is there a way to chomp all whitespace both at the beginning and end of a string? I was thinking of using a regexp like s[^\s*?][]sg and s[\s*?$][]sg; Is there a better way? (I'm thinking of PHP's trim function) I imagine so because I don't think

RE: getting rid of whitespace at the beginning and end of a string

2003-12-12 Thread Charles K. Clarkson
Dan Anderson <[EMAIL PROTECTED]> wrote: : Is there a way to chomp all whitespace both at the beginning : and end of a string? I was thinking of using a regexp like : s[^\s*?][]sg and s[\s*?$][]sg; Is there a better way? : (I'm thinking of PHP's trim function) See perlfaq4: How do I strip bla

Re: Parentheses

2003-12-12 Thread Rob Dixon
Drieux wrote: > [snip] > > "You can have My Prolog Compiler! > when You Rip It From My Cold Dead Hand!" > - (drieux (still in (therapy(issues(resolving(attack(roundies(make > angst Erm, do you agree with me or not? Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

Re: Parentheses

2003-12-12 Thread Wiggins d Anconia
> Wiggins D Anconia wrote: > > > > > Tom Kinzer wrote: > > > > > > > > as a matter of style, i think always having them is nice for > > > > maintenance/readability. > > > > > > I may be wrong, but I think most Perl programmers would disagree. > > > > > > It may be nice for maintenance if your progr

Re: some doubt

2003-12-12 Thread Jim Burnett
Yes, do a search on google. I did this. -Jim - Original Message - From: "Ajey Kulkarni" <[EMAIL PROTECTED]> To: "drieux" <[EMAIL PROTECTED]> Cc: "Perl Perl" <[EMAIL PROTECTED]> Sent: Saturday, December 13, 2003 6:20 AM Subject: some doubt > hi, > How can i rename a file and check the s

help looping through text file

2003-12-12 Thread John Fitzgerald
Hi, 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-Aug-03 301019-Nov-03 301011-Jul-03 301011-

Wrapping Unix Command into Perl

2003-12-12 Thread Anthony J Segelhorst
I am trying to wrap the following Unix command into perl and having a few issues: find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print -exec ls {} \; I have tried (and nothing to seems to work): $temp = `find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print -exec ls {} \;`;

Re: help looping through text file

2003-12-12 Thread Rob Dixon
John Fitzgerald wrote: > > Hi, I'm fairly new to Perl, and trying to do a simple > operation on a text file exported from excel. > ID Enrolled Extraneous Columns > 3008 05-Aug-03 > 3008 05-Aug-03 > 3008 05-Aug-03 > 3008 05-Aug-03 > 3008 24-Sep-03 > 3009 11-Aug-03 > 3010 19-Nov-03 > 301

CSV file - Leading Zeros

2003-12-12 Thread Paul Kraus
Is there a way to write a CSV file so that excel wont drop the leading zero's from fields? I could use spreadsheet::writeexcel or OLE but that's like using a sledgehammer for something that needs to be hand tightened. Thanks. Paul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Session Management

2003-12-12 Thread Mike Blezien
Hello, We are in the process of setting up a session management system for a complex membership system project. I've been reading through the docs on CGI::Session and Apache::Session and was hoping to get some feedback if one is preferred over another, the pros and cons of using one over ano

Re: Session Management

2003-12-12 Thread Kevin Old
On Fri, 2003-12-12 at 15:50, Mike Blezien wrote: > Hello, > > We are in the process of setting up a session management > system for a complex membership system project. I've been > reading through the docs on CGI::Session and Apache::Session > and was hoping to get some feedback if one is pref

Re: Wrapping Unix Command into Perl

2003-12-12 Thread Jeff Westman
Anthony J Segelhorst <[EMAIL PROTECTED]> wrote: > I am trying to wrap the following Unix command into perl and having a few > issues: > > find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print -exec ls {} > \; > > > I have tried (and nothing to seems to work): > > $temp = `find /var/s

Re: IP question

2003-12-12 Thread John W. Krahn
Michael Sullivan wrote: > > I don't know much about Perl yet. I copied a website counter script off > of htmlgoodies.com Do you mean this one? http://htmlgoodies.earthweb.com/beyond/countcgi.txt Since you are new to Perl, it is usually recommended that the NMS scripts are preferred over others:

Re: help looping through text file

2003-12-12 Thread John Fitzgerald
Thanks for the reply, I don't have date::calc but I can CPAN it right now. 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

Re: Session Management

2003-12-12 Thread Mike Blezien
Kevin, that's a bit more then we really wanted to get into for this project, plus portability is going to be an issue too. So it can be installed on serveral differnet servers. So we are thinking it be much easier to install either the Apache or CGI session modules. HTML::Mason is alot more the

Re: Wrapping Unix Command into Perl

2003-12-12 Thread Anthony J Segelhorst
Anthony J Segelhorst <[EMAIL PROTECTED]> wrote: > I am trying to wrap the following Unix command into perl and having a few > issues: > > find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print -exec ls {} \; > > > I have tried (and nothing to seems to work): > > $temp = `find /var/sp

Re: CSV file - Leading Zeros

2003-12-12 Thread Rob Dixon
Paul Kraus wrote: > Is there a way to write a CSV file so that excel wont drop the leading > zero's from fields? I could use spreadsheet::writeexcel or OLE but > that's like using a sledgehammer for something that needs to be hand > tightened. Put your numerics in quotes: "0099" But, depending

Re: Wrapping Unix Command into Perl

2003-12-12 Thread Wiggins d Anconia
> > Anthony J Segelhorst <[EMAIL PROTECTED]> wrote: > > > I am trying to wrap the following Unix command into perl and having a > few > > issues: > > > > find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print -exec ls > {} \; > > > > > > I have tried (and nothing to seems to work):

Re: Wrapping Unix Command into Perl

2003-12-12 Thread Jeff Westman
Anthony J Segelhorst <[EMAIL PROTECTED]> wrote: > Anthony J Segelhorst <[EMAIL PROTECTED]> wrote: > > > I am trying to wrap the following Unix command into perl and having a > few > > issues: > > > > find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print -exec ls > {} \; > > > > > > I

Re: Wrapping Unix Command into Perl /correction

2003-12-12 Thread Jeff Westman
--- Jeff Westman <[EMAIL PROTECTED]> wrote: > Anthony J Segelhorst <[EMAIL PROTECTED]> wrote: > > Anthony J Segelhorst <[EMAIL PROTECTED]> wrote: > > > > > I am trying to wrap the following Unix command into perl and having a > > few > > > issues: > > > > > > find /var/spool/Tivoli/backups -na

Re: Session Management

2003-12-12 Thread Kevin Old
On Fri, 2003-12-12 at 16:08, Mike Blezien wrote: > Kevin, > > that's a bit more then we really wanted to get into for this project, plus > portability is going to be an issue too. So it can be installed on serveral > differnet servers. So we are thinking it be much easier to install either the

Re: getting rid of whitespace at the beginning and end of a string

2003-12-12 Thread John W. Krahn
Dan Anderson wrote: > > Is there a way to chomp all whitespace both at the beginning and end of > a string? That is what is known as a Frequently Asked Question or FAQ. Perl provides copious amounts of documentation including a large list of FAQs in the perlfaq.pod file. Perl also provides a pr

Re: Wrapping Unix Command into Perl

2003-12-12 Thread John W. Krahn
Anthony J Segelhorst wrote: > > I am trying to wrap the following Unix command into perl and having a few > issues: > > find /var/spool/Tivoli/backups -name "DB_*" -mtime +10 -print -exec ls {} > \; > > I have tried (and nothing to seems to work): > > $temp = `find /var/spool/Tivoli/backups -na

Re: Parentheses

2003-12-12 Thread drieux
On Dec 12, 2003, at 12:18 PM, Rob Dixon wrote: [..] Erm, do you agree with me or not? Rob yes and NO! The yes part being that there are times and places where good perl coders know which rules to break and why. Hence, gosh there is that assertion no strict 'refs'; The No Part will take a bit of

RE: CSV file - Leading Zeros

2003-12-12 Thread Tim Johnson
I think this is more an Excel question than a Perl question. Excel will detect that it is a number and show you the equivalent formatted as a number. I think you can highlight the row and do a Format->Cells and pick Text as the type. Otherwise if the first character is a single quote then excel

Re: Parentheses

2003-12-12 Thread Rob Dixon
Hi Drieux. Drieux wrote: > > On Dec 12, 2003, at 12:18 PM, Rob Dixon wrote: > [..] > > > > Erm, do you agree with me or not? > > yes and NO! [snip] > So props for neatish illustrative code. But given > the generalized assertions about it being a list > operator, one would have expected-ish > > m

Re: help looping through text file

2003-12-12 Thread Rob Dixon
John Fitzgerald wrote: > > --- Rob Dixon <[EMAIL PROTECTED]> wrote: > > > > John Fitzgerald wrote: > > > > > > Hi, I'm fairly new to Perl, and trying to do a > > simple > > > operation on a text file exported from excel. > > > ID Enrolled Extraneous Columns > > > 3008 05-Aug-03 > > > 3

Re: Parentheses

2003-12-12 Thread drieux
On Dec 12, 2003, at 2:23 PM, Rob Dixon wrote: [..] That I disagree. [..] not a problem. If anything it gives us something to do. In my own case it helped me go back over the technical distinctions again, and work out how much of my 'habit' of using parens with subs is driven by mere left over c-c

I am having trouble getting win32::guitest calls. To be recognized by gaming app

2003-12-12 Thread PerlDiscuss - Perl Newsgroups and mailing lists
The button clicks in win32::guitest::SendKeys({LEFT}); left arrow actually to be recoginized by the game app. Any ideas. Some keys get recognized but other keys dont. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Newbie question

2003-12-12 Thread Michael Sullivan
Can anyone recommend any free Perl tutorials? I know almost nothing about what I'm doing, only that it looks somewhat like C++... -Michael Sullivan- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Newbie question

2003-12-12 Thread drieux
On Dec 12, 2003, at 3:31 PM, Michael Sullivan wrote: Can anyone recommend any free Perl tutorials? I know almost nothing about what I'm doing, only that it looks somewhat like C++... a great place to start would be There is a set of FAQs - the frequently asked questio

hash problems

2003-12-12 Thread jdavis
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 wrong. thanks, -- jdavis <[EMAIL PROTE

could use an audit

2003-12-12 Thread Kenton Brede
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 how it should really be done I wo

Re: could use an audit

2003-12-12 Thread david
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 how

Re: could use an audit

2003-12-12 Thread James Edward Gray II
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 this mail. If anyone would like to take the

Re: hash problems

2003-12-12 Thread Wiggins d'Anconia
jdavis wrote: 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 wrong. thanks, #! /usr/bin

Win32::SerialPort to log file

2003-12-12 Thread perlrw
I'm trying to get a script to save a barcode scanner's output to a log file. I've been trying to use Win32::SerialPort and my script has begun to slip into a "grasping at straws" state of disarray. I found a script by Bruce S. Garlock that I thought would do about what I wanted. Here's what it's

Re: Parentheses

2003-12-12 Thread R. Joseph Newton
Rob Dixon wrote: > Wiggins D Anconia wrote: > > > > > Tom Kinzer wrote: > > > > > > > > as a matter of style, i think always having them is nice for > > > > maintenance/readability. > > > > > > I may be wrong, but I think most Perl programmers would disagree. > > > > > > It may be nice for mainten

RE: hash problems

2003-12-12 Thread Charles K. Clarkson
jdavis <[EMAIL PROTECTED]> wrote: : : 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 i

Re: help looping through text file

2003-12-12 Thread R. Joseph Newton
John Fitzgerald wrote: > Hi, 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-Aug-03 > 301

Re: CSV file - Leading Zeros

2003-12-12 Thread R. Joseph Newton
Paul Kraus wrote: > Is there a way to write a CSV file so that excel wont drop the leading > zero's from fields? I could use spreadsheet::writeexcel or OLE but > that's like using a sledgehammer for something that needs to be hand > tightened. > > Thanks. > Paul Leading zeroes are meaningful only