Re: automatic cgi scripts?

2001-08-17 Thread Walnut
If you have no access to cron on your server and if your site is getting a reasonable number of hits, place a link to the script on your home page. Every time it runs it checks the time and if past 0800 hours runs your commands and sets a flag in a file to avoid running the command multiple times

Re: referencing and subroutines.

2001-08-17 Thread Walnut
Create the hash in the global part of the program. Pass a reference to the hash to the subroutine and manipulate that. On Tue, 17 Apr 2001 22:37:36 +0200, [EMAIL PROTECTED] (Martijn Van Exel) wrote: >Hi all, > >I'm new to this list and quite new to Perl. I'm on digest, so I'd >appreciate a cc.

Re: Directory Grepping WIN32

2001-08-17 Thread Walnut
Use the Perl version of find: Use File::Find; find(\&wanted, $startdirectory); sub wanted { if ( $File::Find::name =~ m/09\.html$/ ) { # Do whatever you want here to $File::FInd::name # e.g. push @foundfiles, "$File::Find::name"; } } On Wed, 18 Apr 2001 14:44:38 -0400, [E

Re: Removing Leading Zeros

2001-08-17 Thread Walnut
Why not split it into an array first: @fields =~ split(!/!, $string); $index = $fields(3); $value = $fields(5); Just remember that arrays start at an index of zero so in each case you will be asking for the field you want - 1. On Thu, 19 Apr 2001 15:40:27 +, [EMAIL PROTECTED] (Mark Martin

Re: cat a file

2001-08-17 Thread Walnut
Open them both in Outlook and drag the emails from one to the other. DO NOT try it any other way or you will corrupt the files. On Thu, 19 Apr 2001 16:27:31 -0400, [EMAIL PROTECTED] (Frank Drain) wrote: >Hello, > >I am very new to perl. I have two pst (personal folder files) that I want >to c

Re: Another regular expression question?

2001-08-17 Thread Walnut
Suck the file into a single variable and: $entirefile =~ s!\/\*.*?\*\/!!g; On Fri, 20 Apr 2001 09:03:29 +0100, [EMAIL PROTECTED] (Yvonne Murphy) wrote: >I am also very new to Perl! I need to figure out how I could skip a >block of comments in a C header file. For example, if I have something

Re: running a script from html

2001-08-17 Thread Walnut
On Sat, 21 Apr 2001 18:31:22 -0500, [EMAIL PROTECTED] (Chris Brown) wrote: >i was wondering if anyone could fill me in on how to run a cgi script automaticly >when an html page is loaded...reason being to show a random image on a page...thanks >chris brown Use Server Side Includes and make sure

Re: pulling out part of a /path/to/a/file

2001-08-17 Thread Walnut
In your "wanted" subroutine, $_ contains the filename!! $File::Find::dir contains the directory $File::Find::name contains the lot. On Tue, 24 Apr 2001 09:52:04 -0700, [EMAIL PROTECTED] (Sandor W. Sklar) wrote: >Hi, folks ... > >I'm generating a list of files (from a find subroutine) and putt

Re: I am a real begginer to perl......

2001-08-17 Thread Walnut
#open and read open(FILE, "<$filename"); @alllinesinthefile = <>; close(FILE); #open and write. Append uses >> open(FILE, ">$filename"); print FILE @alllinesinthefile; close(FILE); #looping foreach $line ( @alllinesinthefile ) { #Do whatever you want # Go away and study regular expr

Re: Simple HTML Page

2001-08-17 Thread Walnut
Outlook express saves files as text if you drag them to a folder. I am not sure about Outlook though. I think it saves as a binary format although there may be enough text in there to extract something. Check it out with a text editor like Textpad from www.textpad.com. Actually this is an excellen