run function inside script on internal schedule?

2004-04-23 Thread JupiterHost.Net
Sorry if this gets posted twice! I was using a friends computer and sent form his address, which isn't subscribed :) Hello list! On a sleepless Friday night/Saturday morning a question cam to mind and I had to ask... Assume I have a script that will run for 10 seconds. Is it possible to have

Security Question

2004-04-23 Thread WC -Sx- Jones
Originally I asked this question around 1998, I'd like to see if anything new has occurred since then because the client I wrote the security code for which generated this key is *still* using that application today - Please, decode this key: SxEyj/gJs5pXISX11386025 Thank you in advance :) -- _

Re: number of files in a dir

2004-04-23 Thread John W. Krahn
Karl wrote: > > Hi all. Hello, > Is there a module or function which will return the number of files in a dir > or at least have similar results as > > ls -1 | wc -l For the same results as above: my $number_of_files = () = <*>; However that also includes directory names and does not includ

RE: printing pod

2004-04-23 Thread Charles K. Clarkson
WC -Sx- Jones <[EMAIL PROTECTED]> wrote: : : [EMAIL PROTECTED] wrote: : : > I would like to be able to print pod sections to the : screen, like have an : > option to print out my revision history. I'm sure there : must be an easy way : > to handle thisbut how? : : Hmm, the system you are

Re: printing pod

2004-04-23 Thread WC -Sx- Jones
[EMAIL PROTECTED] wrote: I would like to be able to print pod sections to the screen, like have an option to print out my revision history. I'm sure there must be an easy way to handle thisbut how? Hmm, the system you are on doesn't have perldoc ? perldoc -qa.a | perl -lpe '($_)=m("(.*)")' |

RE: printing pod

2004-04-23 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > I would like to be able to print pod sections to the screen, like > have an option to print out my revision history. I'm sure there must > be an easy way to handle thisbut how? The Pod::Usage module comes close to doing what you want; perhaps you can adapt it to you

Re: number of files in a dir

2004-04-23 Thread Wiggins d Anconia
> Hi all. > > Is there a module or function which will return the number of files in a dir > or at least have similar results as > > ls -1 | wc -l > perldoc -f opendir perldoc -f readdir http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

number of files in a dir

2004-04-23 Thread Karl
Hi all. Is there a module or function which will return the number of files in a dir or at least have similar results as ls -1 | wc -l Tks -- Karl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: printing pod

2004-04-23 Thread WC -Sx- Jones
[EMAIL PROTECTED] wrote: I would like to be able to print pod sections to the screen, like have an option to print out my revision history. I'm sure there must be an easy way to handle thisbut how? I use DocSet and related Template Toolkit items... That way the pod is browserable with the WWW

printing pod

2004-04-23 Thread Green_Bob
I have started using pod to document things like revision history, usage and help info within my programs. I need to keep everything self contained within one script so I can easily distribute the utilities...no read.me's. I would like to be able to print pod sections to the screen, like have

Re: Yet more file upload questions

2004-04-23 Thread JupiterHost.Net
John Pretti wrote: All, Howdy, I appreciate all the help with file uploading. I have written a basic script similar to the file upload sample at perlmonks.com. I have noticed that it is written very loosely so I am trying to build in additional security. Some of the things I would like help un

RE: joining lines

2004-04-23 Thread Jan Eden
Charles K. Clarkson wrote on 23.04.2004: >Jan Eden <[EMAIL PROTECTED]> wrote: >: >: Jeff 'japhy' Pinyan wrote on 23.04.2004: >: >: ># read 6 lines from IN and put them in @record >: >my @record = map scalar(), 1 .. 6; >: >: How does this work? >: >: In the map function you gave, the fi

Re: Question regarding splitting files

2004-04-23 Thread Remko Lodder
Thanks guys!! All that helped me, i got it to work. I used the script below, and added some things , well, a friend of mine came up with it: my $size=(stat('/usr/messages.sorted'))[7]; my $chunksize = 10 * 1024 *1024 ; # mb my $split_into = $size/$chunksize; That makes every chunk 10megabyte. So

Re: What does this command do: "|-"

2004-04-23 Thread Shilpa Arvind
Thanks a lot. From: WC -Sx- Jones <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Shilpa Arvind <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: What does this command do: "|-" Date: Fri, 23 Apr 2004 14:35:44 -0400 Shilpa Arvind wrote: This means that, whatever the child process does wil

Re: What does this command do: "|-"

2004-04-23 Thread WC -Sx- Jones
Shilpa Arvind wrote: This means that, whatever the child process does will the output for the parent process and it will be stored in the FILE (file handle). open(FILE, "|-") Forks with the file connected to the STDIN of the child process. No, it means that what you read out of will be input

Re: What does this command do: "|-"

2004-04-23 Thread Shilpa Arvind
Can u explain this little bit clearly. Shilpa From: WC -Sx- Jones <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Shilpa Arvind <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: What does this command do: "|-" Date: Fri, 23 Apr 2004 14:21:37 -0400 Shilpa Arvind wrote: HI, I have started

Re: What does this command do: "|-"

2004-04-23 Thread Shilpa Arvind
This means that, whatever the child process does will the output for the parent process and it will be stored in the FILE (file handle). Shilpa From: WC -Sx- Jones <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Shilpa Arvind <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: What does

Re: Recommended Readings

2004-04-23 Thread Wiggins d Anconia
> What are some of the books you all recommend for learning perl? I have > several perl books and none of them make any sense. Any input is > appreciated. > > Thanks, > John > > This is a very FAQ, you should consult the archives for this list. Additionally you may be interested in, perldoc

Re: What does this command do: "|-"

2004-04-23 Thread WC -Sx- Jones
Shilpa Arvind wrote: HI, I have started learning PERL recently. I wanted some explaination regarding the following command. open(FILE, "|-") What does this command do? open Forks with the file connected to the STDIN of the child process. -- _Sx_ http://youve-reached-the.endoftheinternet.org/

Re: Recommended Readings

2004-04-23 Thread WC -Sx- Jones
John Pretti wrote: What are some of the books you all recommend for learning perl? I have several perl books and none of them make any sense. Any input is appreciated. well, then skip the books ... for now anyways. Try http://learn.perl.org/ on for size and see if it helps; -- _Sx_ http://youve-r

What does this command do: "|-"

2004-04-23 Thread Shilpa Arvind
HI, I have started learning PERL recently. I wanted some explaination regarding the following command. open(FILE, "|-") What does this command do? Thanks Shilpa -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Recommended Readings

2004-04-23 Thread John Pretti
What are some of the books you all recommend for learning perl? I have several perl books and none of them make any sense. Any input is appreciated. Thanks, John

RE: Determining assigned drives

2004-04-23 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Cacialli, Doug wrote: > Is there some way to determine assigned drives? I'm thinking > something like readdir. You can use Win32-DriveInfo which has a number of items that it can do. I installed and wrote a simple script to show me my drives. Can do freebytes, clusters, etc also.

Can't locate object method error

2004-04-23 Thread John Fisher
I need some help debugging this problem ( unless you know the magic answer): I am installing a fresh Bugzilla using Template Toolkit and the GD graphics libraries. ( yes I asked a similar question at the BZ list, too ) I get this error, plugin error - Can't locate object method "load" via package

splitting files (was Re: Joining Lines.)

2004-04-23 Thread WC -Sx- Jones
Jeff 'japhy' Pinyan wrote: my @record = map scalar(), 1 .. 6; It's a neat trick :) Same trick, but to split up *any text* files - #! /usr/local/bin/perl use strict; use warnings; # Example command: # perl split_files syslog [3] # where [] is an optional number of files to sp

Yet more file upload questions

2004-04-23 Thread John Pretti
All, I appreciate all the help with file uploading. I have written a basic script similar to the file upload sample at perlmonks.com. I have noticed that it is written very loosely so I am trying to build in additional security. Some of the things I would like help understanding are as follows:

Determining assigned drives

2004-04-23 Thread Cacialli, Doug
Is there some way to determine assigned drives? I'm thinking something like readdir. By the way, thanks to everyone who responded to my last post re: Win32::ODBC (which as it turned out, wasn't a Win32::ODBC problem at all). I truly appreciate the help! Best, Doug Cacialli ---

RE: joining lines

2004-04-23 Thread Charles K. Clarkson
Jan Eden <[EMAIL PROTECTED]> wrote: : : Jeff 'japhy' Pinyan wrote on 23.04.2004: : : ># read 6 lines from IN and put them in @record : >my @record = map scalar(), 1 .. 6; : : How does this work? : : In the map function you gave, the first argument is scalar, : which takes only one argu

Re: joining lines

2004-04-23 Thread Jan Eden
Jeff 'japhy' Pinyan wrote on 23.04.2004: ># read 6 lines from IN and put them in @record >my @record = map scalar(), 1 .. 6; How does this work? In the map function you gave, the first argument is scalar, which takes only one argument and returns a line from INPUT in scalar context. But

Re: Date calculation

2004-04-23 Thread Chris Charley
- Original Message - From: "Jan Eden" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Chris Charley" <[EMAIL PROTECTED]>; "Perl Lists" <[EMAIL PROTECTED]> Sent: Thursday, April 22, 2004 3:56 AM Subject: Re: Date calculation Hi Chris, Thanks! That's exactly what I needed. Works perf

RE: command line script to run from web

2004-04-23 Thread Wiggins d Anconia
> > Afternoon all, I have a script that runs from the command line but now I > need it to from from the web, anyone know how to do this? > > All the script does is write files so output to the screen isn't important. > It needs to run from the web because there will be a form on a web page an

Re: Perl parsing script

2004-04-23 Thread Claude
> "Ron" == Ron McKeever <[EMAIL PROTECTED]> writes: Ron> I am trying to figure out my Perl parsing script to dump the Ron> interesting part of my log files to another parsed file. [...] Ron> But I get errors... I am affraid You have to solve this issue in any case. Ron> Is there an easier w

RE: command line script to run from web

2004-04-23 Thread Jayakumar Rajagopal
-Original Message- From: Graeme McLaren [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:13 AM To: [EMAIL PROTECTED] Subject: command line script to run from web Afternoon all, I have a script that runs from the command line but now I need it to from from the web, anyone know

command line script to run from web

2004-04-23 Thread Graeme McLaren
Afternoon all, I have a script that runs from the command line but now I need it to from from the web, anyone know how to do this? All the script does is write files so output to the screen isn't important. It needs to run from the web because there will be a form on a web page and when it is

Output LARGE text files to html for searching?

2004-04-23 Thread peery
Hey all, I've got this PERL program written that queries my LDAP for basic info, ie what users are in what groups, what groups are in what OU, etc etc etc. The problem is the results are HUGE, I am talking like 20Mb+ each. So I was thinking all I'd really need to do is echo/print to an .html,

Re: joining lines

2004-04-23 Thread Jeff 'japhy' Pinyan
On Apr 23, Kimberly Schramm said: >I have a file that is 300+ lines long containing data for an event. each >event takes up 6 lines. I would like to join the 6 lines, so that each >event is only one line. Is this possible in perl? Sure. Here's how I'd go about doing it: open IN, "< file.tx

Re: Finding the current IP of my laptop

2004-04-23 Thread Emmanuel Lesouef
> On Thu, 22 Apr 2004 14:20:43 -0700 > "Rajesh Dorairajan" <[EMAIL PROTECTED]> wrote: > > > Sorry. Missed out getting hostname. > > > > use IO::Socket; > > use Sys::Hostname; > > > > $HOSTNAME = hostname(); > > $ip = inet_ntoa((gethostbyname($HOSTNAME))[4]); First of all, thank you all for yo

RE: joining lines

2004-04-23 Thread Charles K. Clarkson
Kimberly Schramm <[EMAIL PROTECTED]> wrote: : : I have a file that is 300+ lines long containing data : for an event. each event takes up 6 lines. I would : like to join the 6 lines, so that each event is only : one line. Is this possible in perl? Yes, you can use the 'join' function for t

joining lines

2004-04-23 Thread Kimberly Schramm
I have a file that is 300+ lines long containing data for an event. each event takes up 6 lines. I would like to join the 6 lines, so that each event is only one line. Is this possible in perl? Thanks for your help! ~ "That