Re: [Perl-unix-users] Automatic ftp download script

2002-03-11 Thread Jason Purdy
This seems to me like one of those "more than one way" things - you could create a daemon or a cronjob to handle this for ya, depending on your needs (speed, efficiency and delay time as important factors that I can think of off the top of my head). Anyway, whatever you end up choosing, you ca

Re: [Perl-unix-users] Regex Problem

2002-03-06 Thread Jason Purdy
Well, I'm not sure what you mean by "anything upto a tilda", but you can write 1 regex to do what you want: $ more test.pl #!/usr/bin/perl $line = '(^FLJK asdf435jk~@!#$'; print "LINE (before): $line\n"; $line =~ s/[^\w\s~]//g; print "LINE (after): $line\n"; $ perl test.pl LINE (before): (^FL

Re: [Perl-unix-users] date/time

2002-02-06 Thread Jason Purdy
Check out the localtime function... perldoc -f localtime You can take the resulting list of date/time elements & create $date and $time. Jason If memory serves me right, on Wednesday 06 February 2002 17:04, Chris Nikou wrote: > how can i retrieve current time & date in order to store them in

Re: [Perl-unix-users] silly question...

2002-01-21 Thread Jason Purdy
Hrmmm ... need some more details - are you always expecting to put 4 0's at the end? If so, it would be a simple: $data = '001023'; sprintf ( "%s", $data ); Don't use %d in the printf() - that will strip away the leading 0's. Jason If memory serves me right, on Monday 21 January 2002 09:

Re: [Perl-unix-users] Regex problem

2002-01-07 Thread Jason Purdy
Well, looking at the pattern, it looks like you need to start your substitution when the pattern matches 'bNN' and ends when it hits an IP address, matching 'NN\.' or 'NNN\.'. So, here's some (baby-talk ;)) code: #!/usr/bin/perl $line = "20011219 074645 b03 3524 switch 10.3.xxx.xxx 3"; # brea

Re: [Perl-unix-users] Stoping a web based application

2001-11-15 Thread Jason Purdy
Short answer: No. You need to either kill the process from the server, or create a separate web program to kill it. Jason If memory serves me right, on Thursday 15 November 2001 11:31, Byron Wise wrote: > I have a web based application that is triggered by a > submit button. While this scrip

Re: [Perl-unix-users] SendMail

2001-11-15 Thread Jason Purdy
Assuming you have root/admin access to the sendmail server, you can check the maillog (usually /var/log). If you don't, then you may want to check out using a different module (other than MIME::Lite). I did a quick lil' look and it doesn't seem to have a debug mode. I have used a module in t

Re: [Perl-unix-users] perl function

2001-11-13 Thread Jason Purdy
perldoc is the command. If you want to see a builtin function, the syntax would be: % perldoc -f push You can "perldoc perldoc" for more information about perldoc. HTH, Jason If memory serves me right, on Tuesday 13 November 2001 03:24, lonh SENG wrote: > Hi all, > > I knew that I can