Re: Persisting Values Across Method Calls

2001-10-30 Thread Martin Pfeffer
you can create a object or use clouses. hope it helps Martin Rex Arul wrote: > Friends, > > How can I persist values across method calls, without using Global > Variables? IS there kind of "static" variables and if so can any of you > provide a simple code example to prove the point? > > Thank

Calling external executable with parameter under WinNT.

2001-10-30 Thread Rubiniec, Krzysztof
Hi, anybody knows why I can't call external executable with a parameter under WinNT (I use cmd "shell"). The parameter is a name of file containing spaces, and that's probably the source of problems. I have been trying to do that in many ways, but none of them works. # for instance $batch = 'C:

RE: Calling external executable with parameter under WinNT.

2001-10-30 Thread Gary Hawkins
#!perl.exe $name="C:\\perl test\\perl text.txt"; `"$name"`; runs Notepad with the txt file under Windows 2000. The double quotes in `"$name"`; are needed for cmd.exe due to the spaces. /g > -Original Message- > From: Rubiniec, Krzysztof [mailto:[EMAIL PROTECTED]] > Sent: Tuesday,

Re: Not loading CGI totally

2001-10-30 Thread Nigel Wetters
John Griessen wrote: >I have not figured out how to run a program yet, though. >Will I be able to run etiher perl or mod perl with the same web server? Apache can run Perl either through CGI or through mod_perl. You can set up different URLs on the same Apache installation to run cgi and mod_per

Re: sub read_config is killing my daemon

2001-10-30 Thread Pete Sergeant
>If I remark (#) the read_config(); in the while loop the daemon doesn't >break. Does any one here have any suggestions? How does it die? &read_config() does contain a die string ... are you getting something similar to: cannot open '$tunnelfile': no such file or directory Or is it some other m

Re: good site..

2001-10-30 Thread Pete Sergeant
"Nafiseh Saberi" <[EMAIL PROTECTED]> wrote in message 005101c1610c$68da3fc0$[EMAIL PROTECTED]">news:005101c1610c$68da3fc0$[EMAIL PROTECTED]... hi. in this site exist many module... http://www.sunsite.ualberta.ca/Documentation/Misc/perl-5.005_03/ __ It may be worth

RE: Calling external executable with parameter under WinNT.

2001-10-30 Thread Rubiniec, Krzysztof
> -Original Message- > From: Gary Hawkins [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 29 2001 11:21 PM > To: Rubiniec, Krzysztof; [EMAIL PROTECTED] > Subject: RE: Calling external executable with parameter under WinNT. > > > #!perl.exe > > $name="C:\\perl test\\perl text.txt";

Re: Calling external executable with parameter under WinNT.

2001-10-30 Thread Pete Sergeant
> `"$batch" "$name"`; > #! doesn't work - and that's the clue of my problems > > and also system doesn't want to work with $batch and $name as it's parameter `` interpolates. You probably want: `"$batch $name"`; or some permutation of. Happy to help +Pete -- [EMAIL PROTECTED] ;;($_='Yw_xUabcd

How to use Class::Struct within Class::Struct

2001-10-30 Thread Rajesh
Hi All, I am trying to use an array of class::Struct as a member of another Class::Struct. This is something like a "array of strcutures within structure" in C. The code is like: use Class::Struct; struct Employee => { name => '$", num => '$', }; struct Dept => { em

RE: Regex query Thanks!

2001-10-30 Thread Girish \(Skyscape\)
That's done !!! This was the problem I was facing since months ! got solved in a day here ! Thanks a lot to all. Long live [EMAIL PROTECTED] ! Girish > -Original Message- > From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 25, 2001 6:52 PM > To: Girish (Sk

RE: off topic - javascript question

2001-10-30 Thread Kipp, James
Here Here !! > -Original Message- > From: Gary Hawkins [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 30, 2001 1:43 AM > To: [EMAIL PROTECTED] > Subject: RE: off topic - javascript question > > > When we're done with the terrorists I suggest we go after > these people cheating > t

Re: shift on an array of arrays

2001-10-30 Thread Andrea Holstein
Will Muir wrote: > I have an array of arrays @data that > I would like to take the reference of the 5th element of the first 3 elements and > put them into another array and then shorten @data by 3. > I hope that this makes sense, I am new to this and > don't really know a better way too expl

Graph generation...

2001-10-30 Thread Durga_Prasad
Placed At : BOM Durga Prasad@SATYAM 10/30/2001 06:44 PM Hi all, Iam trying to genereate a daily graph based on parameters tracked every 15 minutes. Iam using GD.pm by lincoln stein for this purpose. The idea is to present a web based querying syst

beginners join function question

2001-10-30 Thread [EMAIL PROTECTED]
hi, i've read and reread "learning perl"'s explanation of the join function but i still can't get join to do what i want. i have a file which has one word on each line but some lines have more than one word on a line and are seperated by a space. i want to join all the words together so th

Is ggoing to mod_perl easy?

2001-10-30 Thread Etienne Marcotte
I am now doing my website not using mod_perl. I am however using strict everywhere. If I see that the performances aren't satisfying (on a mySQL database), would it be hard to go to mod_perl? Or it's really better to develop right from the start in mod_perl? I have an hard time fully understandi

RE: Is ggoing to mod_perl easy?

2001-10-30 Thread John Edwards
You could try fastcgi. What webserver are you using?? www.fastcgi.com -Original Message- From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] Sent: 30 October 2001 13:20 To: [EMAIL PROTECTED] Subject: Is ggoing to mod_perl easy? I am now doing my website not using mod_perl. I am however

RE:error return function

2001-10-30 Thread Jorge Goncalvez
Hi, I have this code: if (/:\s*\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:/) { my $host = gethostbyaddr (&inet_aton ($_Globals{IP_ADDR}), AF_INET) or die "je ne peux résoudre $_Globals($_Globals{IP_ADDR}) :$!\n"; ($_Globals{CLIENT_NAME})=$host=~ /^(\w+)/; } it works

find placement of one string in another

2001-10-30 Thread Greg . Froese
How do I find where one string is in another? if i have $test = "one day I went to the zoo"; and I want to find how many characters into $test the word "went" is, how do I go about that? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: sorting by data

2001-10-30 Thread Jeff 'japhy' Pinyan
Ovid started a discussion about his reply to this post, and I made a reply, and he suggested I post it. To save some bandwidth, here's the URL: http://www.perlmonks.org/index.pl?node_id=122028 -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother

Re: find placement of one string in another

2001-10-30 Thread Jeff 'japhy' Pinyan
On Oct 30, [EMAIL PROTECTED] said: >$test = "one day I went to the zoo"; > >and I want to find how many characters into $test the word "went" is, how >do I go about that? The simple index() function: if (($pos = index($test, "went")) > -1) { print "'went' was found at position $pos\n";

RE: Is ggoing to mod_perl easy?

2001-10-30 Thread Sidharth Malhotra
Porting to mod_perl is not exceptionally difficult. Once you have your Apache/mp server up you can still run your scripts as regular cgi, and "port" them to mod_perl one by one. When you "port" a script to mod_perl, you simply need to put it into a directory where scripts are being compiled with

$a = $b eq "" ? 1 : 0;

2001-10-30 Thread Etienne Marcotte
$allowed = $username eq 'admin' ? 1 : 0; Can someone explain me this line? I don't get the ? 1 : 0 part They say it need to be used instead of $allowed = 1 if $username eq 'admin'; for a mod_perl env. Etienne -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

RE: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread RArul
If the username is equal to admin, $allowed is assigned 1 or else it is assigned a value of 0. Rex -Original Message- From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 9:56 AM To: [EMAIL PROTECTED] Subject: $a = $b eq "" ? 1 : 0; $allowed = $username eq

Re: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Etienne Marcotte
Thanks a lot Reading this it's probably always better to use this way of assigning values. This way it does not stays set to 1 if you decide to switch to mod_perl later:-) Etienne [EMAIL PROTECTED] wrote: > If the username is equal to admin, $allowed is assigned 1 or else it is > assigned a va

FW: workaround for unix2dos system command

2001-10-30 Thread Rice, Elizabeth A.
Well, I think I've fixed most of the newbie mistakes thanks to forum help. I also found out that the x'15' is the character under EBCDIC, so had to change my regex. Here's the new code snip.. open (VDOSLOG, ">$VIRUS_DLOG") or die "Error cannot open dos virus log: $!"; while( ) { # s/\x0A/\x

Re: beginners join function question

2001-10-30 Thread walter valenti
#!/usr/bin/perl #use strict; open (NAMES, "names.txt")||die "can't open names.txt $!"; while($lin=){ push (@list,$lin); } $result=join(" ",@list); Bye Walter > hi, > i've read and reread "learning perl"'s explanation of the join > function but i still can't get join to do

Re: beginners join function question

2001-10-30 Thread Pete Sergeant
open(NAMES, "names.txt")||die "$!"; ($result = join '', )=~s/\s+/ /g; +Pete -- [EMAIL PROTECTED] ;;($_='Yw_xUabcdtefgdijktljkotiersjkUzxT yvlkbfdtcierstajogvPruntRshackRJelov')=~ y&/RTUv;wxYz$&/ ~'/;$=();$&&&eval&&print "Walter Valenti" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]

RE: Exported variables

2001-10-30 Thread Bob Showalter
> -Original Message- > From: Walter Grace [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 29, 2001 4:41 PM > To: [EMAIL PROTECTED] > Subject: RE: Exported variables > > > As a note... > > If I specify the variables in the 'use' statement (ie. use SI::env > qw($mysqlhost $mysqluser $

RE: logging out a user

2001-10-30 Thread Bob Showalter
> -Original Message- > From: Matthew Blacklow [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 29, 2001 7:33 PM > To: [EMAIL PROTECTED] > Subject: logging out a user > > > Hi Guys, > > Got a bit of a conundrum here. I have a perl script that does various > things for any user who runs

Uniq'ing an array (previously Re: Search matching problems)

2001-10-30 Thread Robert Thompson
Thanks that worked and was the simple solution I was looking for. Another question though, is there a simple way to uniq an array, ie search through it and removing all duplicates? Up until now I have been making a clumsy subroutine to do this, but I am wondering if there is som

RE: sub read_config is killing my daemon

2001-10-30 Thread Bob Showalter
> -Original Message- > From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 30, 2001 12:57 AM > To: [EMAIL PROTECTED] > Subject: sub read_config is killing my daemon > > > Hey All, > > I have a perl script here (below) that becomes a daemon when > ever I run > it

RE: good site..

2001-10-30 Thread Bob Showalter
> -Original Message- > From: Pete Sergeant [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 29, 2001 4:57 AM > To: [EMAIL PROTECTED] > Subject: Re: good site.. > > ...additionally, you can automatically install CPAN > modules by typing 'cpan' at your command line for newer > versions o

RE: good site..

2001-10-30 Thread Brett W. McCoy
On Tue, 30 Oct 2001, Bob Showalter wrote: > I was not aware of this. Which version? My 5.6.1 doesn't > seem to have this. Is this just a small shell script that > does perl -MCPAN -e shell? Exactly what it does: #!/usr/bin/perl eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if 0; # not running

?? very odd messages....

2001-10-30 Thread Chris Zubrzycki
does anyone know why my incomming messages form this list are prefixed "by onion.perl.org (qpsmtpd/0.04) with SMTP; Tue Oct 30 16:22:25 2001 -" here is an example of the headers... by onion.perl.org (qpsmtpd/0.04) with SMTP; Tue Oct 30 16:22:25 2001 - Received: by FRISTX with Intern

RE: Is ggoing to mod_perl easy?

2001-10-30 Thread Bob Showalter
> -Original Message- > From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 30, 2001 8:20 AM > To: [EMAIL PROTECTED] > Subject: Is ggoing to mod_perl easy? > > > I am now doing my website not using mod_perl. I am however > using strict > everywhere. > > If I see t

RE: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Bob Showalter
> -Original Message- > From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 30, 2001 9:56 AM > To: [EMAIL PROTECTED] > Subject: $a = $b eq "" ? 1 : 0; > > > $allowed = $username eq 'admin' ? 1 : 0; > > Can someone explain me this line? I don't get the ? 1 : 0 part

Non-whitespace characters

2001-10-30 Thread Stephen LeClaire
Does anyone have a slick way to grab up these characters (\W) and slap them into an array? Thanks, Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Binary chars

2001-10-30 Thread Ismar . Dupanovic
I have a text file that was created by a Windows application for reporting. I have to do some formatting on it so I FTP it to the UNIX box and want to use PERL and regexp to format the file. I had to use binary FTP option as this file seems to contain some binary characters. When I open the file

Re: Uniq'ing an array (previously Re: Search matching problems)

2001-10-30 Thread Jeff 'japhy' Pinyan
On Oct 30, Robert Thompson said: > Another question though, is there a simple way to uniq an array, >ie search through it and removing all duplicates? Up until now I have >been making a clumsy subroutine to do this, but I am wondering if there >is something more simple that will handle this

Re: Non-whitespace characters

2001-10-30 Thread Jeff 'japhy' Pinyan
On Oct 30, Stephen LeClaire said: >Does anyone have a slick way to grab up these characters (\W) and slap >them into an array? \W is not "non-whitespace". \S is non-whitespace. You probably just want to use split(): @fields = split ' ', $string; The ' ' argument to split() is magical, and

RE: ?? very odd messages....

2001-10-30 Thread Richard_Cox
Chris Zubrzycki <[EMAIL PROTECTED]> wrote: > prefixed > "by onion.perl.org (qpsmtpd/0.04) with SMTP; Tue Oct 30 16:22:25 2001 > -" Looks like there is a config error in ezmlm, this is exactly what I'm getting (and its really confusing Exchange/Outlook -- not that that takes a lot). E.g. y

Re: Non-whitespace characters

2001-10-30 Thread Curtis Poe
--- Stephen LeClaire <[EMAIL PROTECTED]> wrote: > Does anyone have a slick way to grab up these characters (\W) and slap > them into an array? > > Thanks, > > Steve Steve, On the off chance that you meant non-word characters (\W) that you mentioned in your email instead of the non-whitespace

headers

2001-10-30 Thread Chris Zubrzycki
the key is to remove the 2 blank lines surrounding the "by onion.perl.org " line.PITA. here are the full headers: From Tue Oct 30 11:26:49 2001 Return-Path: <[EMAIL PROTECTED]> Received: from smtpin03.mac.com ([10.13.10.70]) by mail03.mac.com (Netscape Messaging Server 4.15

Grabbing non-word characters.

2001-10-30 Thread Stephen LeClaire
Thanks to the replys to my previous, though in error, question about white space characters. What I was looking for, but not properly describing, was a way to fill an array with non-word characters - much like "@array = ( 'a' .. 'b' );" would be used to fill with lowercase characters. Thanks in

Re: logging out a user

2001-10-30 Thread Pete Sergeant
Find out your Perl PID, find out the user who's running it, and kill their session using `kill`? +Pete "Bob Showalter" <[EMAIL PROTECTED]> wrote in message 2E4528861499D41199D200A0C9B15BC031B508@FRISTX">news:2E4528861499D41199D200A0C9B15BC031B508@FRISTX... > > -Original Message- > > Fro

Re: Graph generation...

2001-10-30 Thread Michael D. Risser
On Tuesday 30 October 2001 08:14 am, [EMAIL PROTECTED] wrote: > Placed At : BOM > > > Durga Prasad@SATYAM > 10/30/2001 06:44 PM > > Hi all, > Iam trying to genereate a daily graph based on parameters tracked every 15 > minutes. > Iam using GD.pm by li

Re: Grabbing non-word characters.

2001-10-30 Thread Jeff 'japhy' Pinyan
On Oct 30, Stephen LeClaire said: >What I was looking for, but not properly describing, was a way to fill >an array with non-word characters - much like "@array = ( 'a' .. 'b' >);" would be used to fill with lowercase characters. The simplest way I can think of is: @non_words = grep /\W/, ma

Re: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Me
> > $allowed = $username eq 'admin' ? 1 : 0; > > > > $allowed = 1 if $username eq 'admin'; > > FWIW, that statement by itself has no relationship to mod_perl. Well, I think the point is that mod_perl doesn't reset the value of variables between runs so the second line may not do what the progra

Re: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Jeff 'japhy' Pinyan
On Oct 30, Me said: >> > $allowed = $username eq 'admin' ? 1 : 0; >> > >> > $allowed = 1 if $username eq 'admin'; >> >> FWIW, that statement by itself has no relationship to mod_perl. > >Well, I think the point is that mod_perl doesn't reset the value >of variables between runs so the second li

Re: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Etienne Marcotte
using $allowed = ($username eq 'admin'); how do I check for allowed? with 1 :0 I can do if ($allowed), do I need to do if ($allowed eq "true")? If yes it's a little longer to write:-) Etienne Jeff 'japhy' Pinyan wrote: > On Oct 30, Me said: > > >> > $allowed = $username eq 'admin' ? 1 : 0; > >>

Re: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Jeff 'japhy' Pinyan
On Oct 30, Etienne Marcotte said: >using $allowed = ($username eq 'admin'); >how do I check for allowed? with 1 :0 I can do if ($allowed), do I need to do >if ($allowed eq "true")? If yes it's a little longer to write:-) Did you bother looking at what eq returns? It returns 1 or '', which means

RE: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Bob Showalter
> -Original Message- > From: Me [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 30, 2001 1:05 PM > To: Bob Showalter; 'Etienne Marcotte'; [EMAIL PROTECTED] > Subject: Re: $a = $b eq "" ? 1 : 0; > > > > > $allowed = $username eq 'admin' ? 1 : 0; > > > > > > $allowed = 1 if $username

GD examples

2001-10-30 Thread Jerry Preston
All, I am look for some good perl examples using GD. Are there any good simple ones to complex around? Thanks, Jerry -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

STDERR question.

2001-10-30 Thread Peter Lemus
Hi folks, I would like to send all errors and messages to a file, but also to the screen when the script execute. With this config, it seems to just send it to the file but not the screen.sub DEBUG () { 2 }; # set level of debugness. open (STDERR, ">/tmp/computron.logout.log") or die $!; sele

Perl file creation

2001-10-30 Thread Scott Lutz
I have a Perl script that is creating files. The only problem is that they are being created with the wrong username:group. Any idea as to why this is happening, and an easy way to fix it? --- scott lutz ---

QUestion regarding this search script:

2001-10-30 Thread AMORE,JUAN (HP-Roseville,ex1)
Hello Perl Experts, Can anyone show me why the following script will only search and print "What kind of computer is this?" but not the rest of other two items; ie "has been working very hard." & "Since then," These are sentences within a text paragraph file which I'm trying to capture and display

send errors to log and screen too.

2001-10-30 Thread Peter Lemus
Hi folks, how can I send the output of my script to a errorlog and to the screen at the same time. It is sending it only to the errorlog. sub DEBUG () { 1 }; # set level of debugness. open (STDERR, ">>/tmp/computron.logout.log") or die $!; select STDERR; # Begin: logout the computron user: sys

Re: STDERR question.

2001-10-30 Thread _brian_d_foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Peter Lemus) wrote: > I would like to send all errors and messages to a > file, but also to the screen when the script execute. you need IO::Tee http://search.cpan.org/search?dist=IO-Tee -- brian d foy <[EMAIL PROTECTED]> - Perl services for

Re: Perl file creation

2001-10-30 Thread _brian_d_foy
In article <007101c1617a$9fd47590$58644c18@windomain>, [EMAIL PROTECTED] (Scott Lutz) wrote: > I have a Perl script that is creating files. The only problem is that > they are being created with the wrong username:group. Any idea as to > why this is happening, and an easy way to fix it? do yo

RE: QUestion regarding this search script:

2001-10-30 Thread Wagner-David
I removed the \b from the processing. On $one you never assign anything. Since you are really just finding a particular field and saving, why not use paras and if found then assign what is found. I used __DATA__ to hold the data. Also the ? with regards to a regular expression needs t

Re: Using the require command with perl

2001-10-30 Thread Michael Fowler
On Mon, Oct 29, 2001 at 07:07:54AM +0100, Pete Sergeant wrote: > $file = "/absolute/path/to/files/$FORM{'id'}/options.txt"; > eval "require $file"; The contents of $file are going to show up as an expression with barewords, division, and concatenation; it won't compile. Did you mean: $file

Re: Grabbing non-word characters.

2001-10-30 Thread Michael Fowler
On Tue, Oct 30, 2001 at 12:49:06PM -0500, Jeff 'japhy' Pinyan wrote: > If you want PRINTABLE non-words characters, then you probably want: > > @non_words = grep /\W/, map chr, 33 .. 126; I would suggest: use POSIX qw(isprint); @non_words = grep { isprint($_) && /\W/ } map chr, 0 .. 2

Re: Perl file creation

2001-10-30 Thread Scott Lutz
I have no choice. I run it from a web browser, so it takes the www:www permissions that the machine gives it. - Original Message - From: "_brian_d_foy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 30, 2001 1:06 PM Subject: Re: Perl file creation > In article <0071

Access MS SQL using DBI / DBD

2001-10-30 Thread Erramilli, Pathi (P.)
Hi, I am new to perl...I am trying to use DBI / DBD to access MS SQL database and I cannot find any documentation/help. What I need to do is to login to the SQL server and get the database space details.(MS SQL 7.0 & 2000) Can someone help...Thanks in advance. Pathi -- To unsubscribe, e-ma

Re: Repeating Characters

2001-10-30 Thread John W. Krahn
David Gilden wrote: > > I have some documents that looked fine via telnet, > however when I FTP'd them on my local Mac and opened them > up in BBEdit the text looks like the following: > > > >

Changing users postfix password

2001-10-30 Thread Daniel Falkenberg
Hey all, I am working on a CGI script where I need it to change a users postfix password. At the moment my script runs as apache and I really need to issue this command... system("echo $password | /usr/bin/sudo passwd --stdin $username"); This command works from a Unix prompt but doesn't work

file test fails 2nd time thru

2001-10-30 Thread HANSON
Hi Gurus! I have a fairly large perl script which optionally runs through a few subroutines doing similar things to different files. Sorry I can't be more detailed. My problem is this: within these subroutines are file tests: (-e $File) or die type of stuff. The first time through these test

Re:

2001-10-30 Thread Michael Kelly
Am I the only one receiving all the emails from the Perl Beginners, Perl Beginners CGI, and MacPerl lists as "" from nobody? (All the headers are in the message body.) Is this something on my end? All other emails I get are ok. Thanks, -Michael Kelly Email: [EMAIL PROTECTED] The Web: http://www.

Re: Regex frustration...

2001-10-30 Thread John W. Krahn
Daniel Falkenberg wrote: > > Basically I have a file like the following... > > test1:x:26:testing1 > test2:x:45:testing2 > test3:x:45:testing3 > test4:x:23:testing4 > test5:x:45:testing5 > > Now I need to strip everything in there that is before the first ':' and > only match anything with the

Re: execuating fast...

2001-10-30 Thread Jan Kirchhoff
Hi, when I'm debugging (which is quite near to optimising them), I'm simply adding use strict; use diagnosticts; use warnings; thats all, when your program starts without complaints, you're good... To get to a lower level: use algorithm-flow-charts to visualise your program, and then optimise it

Order of operations!

2001-10-30 Thread Matthew Blacklow
Below is some perl code which works fine when executed locally, however when I telnet to the system it is on and and it is run things are not run in the correct order. In fact it skips the first system call all together. Any suggestions on how to fix this? #!/usr/bin/perl $pid = getppid; print

Re: Order of operations!

2001-10-30 Thread Rob
Have you tried using the complete path to a.out? (ie /home/myname/bin/a.out) On Wed, 31 Oct 2001, Matthew Blacklow wrote: > Below is some perl code which works fine when executed locally, however when > I telnet to the system it is on and and it is run things are not run in the > correct order.

flock() question

2001-10-30 Thread documents
Hi, I'm trying to lock a file exclusively so that other process has no access to it I'm using: flock($fh,2); It does work, and in the second process I use the same procedure. The problem is that I can't set a time limit for the lock. I want to try to capture the lock, and if unsuccessful, the

Re: file test fails 2nd time thru

2001-10-30 Thread Andrea Holstein
Hanson wrote: > > I have a fairly large perl script which optionally runs > through a few subroutines doing similar things to different > files. Sorry I can't be more detailed. > My problem is this: within these subroutines are file tests: > > (-e $File) or die > > type of stuff. > > The first

Re: flock() question

2001-10-30 Thread Pete Sergeant
look in to the alarm() function perldoc -f alarm +Pete -- [EMAIL PROTECTED] ;;($_='Yw_xUabcdtefgdijktljkotiersjkUzxT yvlkbfdtcierstajogvPruntRshackRJelov')=~ y&/RTUv;wxYz$&/ ~'/;$=();$&&&eval&&print <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > I'

Re: send errors to log and screen too.

2001-10-30 Thread Andrea Holstein
Peter Lemus wrote: > > Hi folks, how can I send the output of my script to a > errorlog and to the screen at the same time. It is > sending it only to the errorlog. > A simple stupid solution would be: write all you want to print to a variable. print the variable to screen and print the variable

Re: headers

2001-10-30 Thread Andrea Holstein
Chris Zubrzycki wrote: > > the key is to remove the 2 blank lines surrounding the "by > onion.perl.org " line.PITA. > > here are the full headers: > ... What have you already tried ? If you want to remove blank lines, there is a simple way: Let's suggest your header lines are in the array

Re:create an empty file

2001-10-30 Thread Jorge Goncalvez
Hi, How do u create an empty file named c:\cygwin_syslog.txt in Perl? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Getting a module to work

2001-10-30 Thread Crowder, Rod
> -Original Message- > From: Simon Rowan [mailto:[EMAIL PROTECTED]] > Sent: 29 October 2001 16:43 > To: [EMAIL PROTECTED] > Subject: Getting a module to work > > > Ok, I give up. How do I install a new module? > > I am using Activeperl 5.6 (Build 631) and have downloaded a module > Wi

RE:Write to a file

2001-10-30 Thread Jorge Goncalvez
Hi, I would write to a file c:\cygwin\etc\dhcpd\dhcpd.conf which contains this: vendor-class "PXEClient" { filename "/bootp/linux/pxe/pxeloader" ; default-lease-time 1800; max-lease-time 1800; option host-name "CLIN_1" ; ... I want to put