file locking before move?

2002-11-16 Thread Rory O'Connor
I am using File::Copy to move a file from one directory to another. However, I do not want to move the file if it is being written to (by another program). Do i need to lock the file before moving it or does File::Copy by nature wait until a file is not being written to before moving? I lo

Global/local variable declaration

2002-07-11 Thread Rory O'Connor
script itself. I tried using "my $variable = whatever;" in the config file but it didn't seem to work either. Does this mean that if I use strict I can only use variables I declate in the script itself? Thanks, Rory -- Rory O'Connor [EMAIL PROTECTED] Ph: 773.907.9101 Cell

Perl installation problem

2002-01-03 Thread ROry O'Connor
on't work and I can't re-install them. I think it has to do with a half-installed 5.6.1. I don't know what to do, I don't want to destroy anything. Any ideas appreciated! thanks, rory -- Rory O'Connor [EMAIL PROTECTED] Phone: 773.907.9101 Cell: 773.398.4017 Fax:

URL-encoding strings

2002-01-02 Thread ROry O'Connor
Is there any way to automatically URL-encode strings with Perl? MSIE does this automatically, but I noticed that Konqueror does not. Thanks! Rory -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

only accept 10 characters

2001-12-10 Thread rory o'connor
Thanks for everyone's help so far! This is an enjoyable list to read everyday. OK, can someone tell me how to take a variable that *may* be over 10 characters, and blow away anything after the 10th caracter? I am operating on phone numbers and the first thing I am doing is blowing away any

calling a server via http

2001-12-08 Thread rory o'connor
I'm not sure if perl is best suited for this project - but I bet it is! I need to call a server (perhaps via lynx?) in a cron'd script and then time how long it takes for the page to load. The reason is that sometimes the remote server stops loading pages due to some unknown problem (this is

stripping out non-numbers

2001-12-07 Thread rory o'connor
what would the regex be for stripping out non-numeric characters from a string? I am trying to format phone numers in a standard way, so i want to strip out all the extras people enter like . - ( ) [space] any help appreciated! thanks, rory -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

checking file date/time

2001-08-30 Thread Rory O'Connor
Can anyone help me with - or point me to a resource - about checking file date/time with perl? I need to write a small script that i can run with cron and will e-mail me if a particular file is older than 2 days. The file in question is supposed to be refreshed daily but sometimes our linkage br

ignoring case when comparing two vars

2001-08-30 Thread Rory O'Connor
I am comapring e-mail addesses in this fashion: if ($email eq $name_list[10]) { whatever } but i just realized that the email address can be the same but the case different and it won't match. How can I ignore the case for the purpose of comparison? Thanks! providing the finest in midget tech

RE: Stripping line breaks

2001-08-25 Thread Rory O'Connor
What is the actual character applied when someone hits the return key in a TEXTAREA form field (in windows...if it matters)? That's the character I need to strip out. Thanks! On Sat, 25 Aug 2001 11:50:36 -0500, Rory O'Connor wrote: > If you always know it will be a \n, then you

Re: Stripping line breaks

2001-08-25 Thread Rory O'Connor
p *all* newline characters out of a string, no matter where they are. am i right in assuming regex needed for this? Thanks! providing the finest in midget technology Hello Rory, Saturday, August 25, 2001, Rory O'Connor <[EMAIL PROTECTED]> wrote: ROC> Another quick one - how can I easil

Stripping line breaks

2001-08-25 Thread Rory O'Connor
Another quick one - how can I easily strip line break characters from a variable? Thanks! providing the finest in midget technology -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Getting the time

2001-08-25 Thread Rory O'Connor
All I need to do is find out how to get the current date and time from the server so that I can write it to a logfile I'm creating. How can I do that? Thanks! Rory providing the finest in midget technology -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P