How 'global' are STDIN/STDOUT/STDERR?

2003-01-15 Thread Beau E. Cox
Hi all - I am developing a perl 5.8 application using the new threading model. I use this technique (thanks Jenda!) to dup STDIN to a temp file handle: ... open SAVIN, '<&STDIN'; open (STDIN,'<&' . $tmpfh->fileno) or die "..."; my $out = `some-command 2>&1`; open STDIN, '<&SAVIN'; clos

how to: perl and gnuplot ???

2003-01-15 Thread Martin A. Hansen
hi i have script which generates a set of xy coordinates. how can i get the script to generate a gnuplot postscript file from theses xy-pairs? martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: how to: perl and gnuplot ???

2003-01-15 Thread David T-G
Martin, et al -- ...and then Martin A. Hansen said... % % hi Hi! % % i have script which generates a set of xy coordinates. % % how can i get the script to generate a gnuplot postscript file from theses % xy-pairs? It's been a while since I've played with gnuplot, so I have no idea of the a

Re: File Handling

2003-01-15 Thread John W. Krahn
Colin Johnstone wrote: > > Gidday all, Hello, > Im having trouble reading and writing to this file, It's probably just > something silly. > Heres my code. I have set the permissions on the file to 775. > > > my ($filename); > > $filename = > "/home/bdweb8083m/johnstonefamily.com/cgi-bin/hp_da

RE: File Handling

2003-01-15 Thread Colin Johnstone
John, Thank you for your help. Colin -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 15 January 2003 11:00 PM To: [EMAIL PROTECTED] Subject: Re: File Handling Colin Johnstone wrote: > > Gidday all, Hello, > Im having trouble reading and writing to t

pipe in perl ???

2003-01-15 Thread Martin A. Hansen
hi how to use an array as input for a external command called within a perl script? im looking to pipe the array to the extarnal program ... martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: pipe in perl ???

2003-01-15 Thread John W. Krahn
"Martin A. Hansen" wrote: > > hi Hello, > how to use an array as input for a external command called within a perl script? > > im looking to pipe the array to the extarnal program ... open PIPE, '| somecommand' or die "Cannot open pipe to somecommand: $!"; print PIPE @array; close PIPE or di

RE: Recommend an email module?

2003-01-15 Thread Bill Akins
Hi Paul, I have used Mail::Sender with good success with attachments. Sample code snipet from an NT install follows. The entire program created a spreadsheet of SMTP stats through Spreadsheet::WriteExcel and this portion mailed off the completed .xls file on the 1st of every month. @MailMe =

Network Administration and Perl

2003-01-15 Thread Paul Kraus
What are some of the ways you guys use Perl for network administration? Paul Kraus Network Administrator PEL Supply Company 216.267.5775 Voice 216-267-6176 Fax www.pelsupply.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Network Administration and Perl

2003-01-15 Thread Tucker, Ernie
1. Logging into cisco routers and polling info with a cron job. It then emails and pages if something is wrong 2. For running specific commands on certain cisco gear to grab instant info. 3. Running scripts to pull customer information from mysql databases I LOVE PERL :) -Original Message-

Re: pipe in perl ???

2003-01-15 Thread Martin A. Hansen
On Wed, Jan 15, 2003 at 05:34:59AM -0800, John W. Krahn wrote: > "Martin A. Hansen" wrote: > > > > hi > > Hello, hi again > > > how to use an array as input for a external command called within a perl script? > > > > im looking to pipe the array to the extarnal program ... > > open PIPE, '

Re: pipe in perl ???

2003-01-15 Thread wiggins
Sorry if I already missed a post where you said you couldn't (have had the flu), but could you use one of the various modules in CPAN to control gnuplot instead of trying to manipulate it yourself? A quick search: http://search.cpan.org/search?query=Gnuplot&mode=all http://search.cpan.org/author

Random Number Generation

2003-01-15 Thread Maurice O'Prey
Hi All How do I extract a whole number from the rand function. I am using rand 25000; which generates a random number with many decimal places, e.g. 16235.2587965, I need a whole number as the answer. Sorry if this is simple... Regards Maurice -- To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

printing number with commas in it

2003-01-15 Thread Johnson, Reginald (ECCS)
I am trying to print a number with commas in it. I cannot find the correct syntax to do this with printf. I considered using the substr function but this depends on mealways knowing the size of the number. Can you help me with this? Reggie -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

determining variable types

2003-01-15 Thread OROSZI Balázs
Hello! Is it possible to get the type of a variable at run time? Suppose I have $var which may be a ref to a hash, or a ref to an array or a scalar (maybe a ref to it). Should I try to hack it out from the address (the weird thing, for example ARRAY(0x...))? Or is there any other way? Please, a

determining variable types

2003-01-15 Thread OROSZI Balázs
Hello! Is it possible to get the type of a variable at run time? Suppose I have $var which may be a ref to a hash, or a ref to an array or a scalar (maybe a ref to it). Should I try to hack it out from the address (the weird thing, for example ARRAY(0x...))? Or is there any other way? Please, an

determining variable types

2003-01-15 Thread OROSZI Balázs
Hello! Is it possible to get the type of a variable at run time? Suppose I have $var which may be a ref to a hash, or a ref to an array or a scalar (maybe a ref to it). Should I try to hack it out from the address (the weird thing, for example ARRAY(0x...))? Or is there any other way? Please, an

RE: Random Number Generation

2003-01-15 Thread Ed Christian
> -Original Message- > From: Maurice O'Prey [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 9:28 AM > Hi All > > How do I extract a whole number from the rand function. > > I am using rand 25000; which generates a random number with > many decimal > places, e.g. 16235.258

Re: ppm: No suitable installation target for package G

2003-01-15 Thread David Eason
Thanks! Now I have another problem. Is there a ppm repository for File-DosGlob or do I need to figure out how to get the cpan shell working in Windows? "Jenda Krynicky" <[EMAIL PROTECTED]> wrote in message 3E21CB2D.30323.C586393@localhost">news:3E21CB2D.30323.C586393@localhost... > From: "David E

Time Clock Idea

2003-01-15 Thread Paul Kraus
I am thinking about designing a new time clock system for my work. I was looking at the digital persona u.are.u devices. Has anyone written any code to work with these for authentication? Is it even possible. It would be nice to just through up a couple sensors. An employee comes in. Sticks his fi

Re: pipe in perl ???

2003-01-15 Thread Martin A. Hansen
On Wed, Jan 15, 2003 at 08:27:13AM -0600, [EMAIL PROTECTED] wrote: > Sorry if I already missed a post where you said you couldn't (have had the flu), but >could you use one of the various modules in CPAN to control gnuplot instead of trying >to manipulate it yourself? > hi i did look at it, bu

perl confusion/ and passwd

2003-01-15 Thread Edmund
Hi, I need some help getting cleared up with an issue I had this afternoon (and still trying to figure out now). I have Perl 5.6.1 installed at work. It didn't come (AFAIK) with NDBM_FILE.pm. (Required for chpass... which brings me to a different question that I'll ask after this). So I go to

RE: Random Number Generation

2003-01-15 Thread Dylan Boudreau
int(rand 25000) Dylan -Original Message- From: Maurice O'Prey [mailto:[EMAIL PROTECTED]] Sent: January 15, 2003 10:28 AM To: [EMAIL PROTECTED] Subject: Random Number Generation Hi All How do I extract a whole number from the rand function. I am using rand 25000; which generates a ran

RE: determining variable types

2003-01-15 Thread Dan Muey
Do you realize you've posted this message three times so far today and I think yesterday as well? Check your mail prog. > -Original Message- > From: OROSZI Balázs [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 14, 2003 3:56 PM > To: [EMAIL PROTECTED] > Subject: determining variable

RE: printing number with commas in it

2003-01-15 Thread Beau E. Cox
Hi Reggie! > -Original Message- > From: Johnson, Reginald (ECCS) [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 14, 2003 11:32 AM > To: '[EMAIL PROTECTED]' > Subject: printing number with commas in it > > > I am trying to print a number with commas in it. I cannot find > the correc

Re: CSV File Creation

2003-01-15 Thread zentara
On Wed, 15 Jan 2003 08:46:04 +1100, [EMAIL PROTECTED] (Colin Johnstone) wrote: >Is a CSV a comma delimited list. If so when creating a CSV how does one cope with >fields that have commas in them. > >An address filed for example could be written suite 2, lvl 3. > >Do you write the field names out

RE: determining variable types

2003-01-15 Thread Beau E. Cox
Hi - > -Original Message- > From: OROSZI Balázs [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 14, 2003 11:56 AM > To: [EMAIL PROTECTED] > Subject: determining variable types > > > Hello! > > Is it possible to get the type of a variable at run time? > Suppose I have $var which may be

RE: perl confusion/ and passwd

2003-01-15 Thread Dan Muey
You may want to try using some unix functions to do this. If you're really good at verifying that their input is legal, that the user exists, that their old password is right and that the new ones match and you're 100% sure oyu want to do this you could always do backtick execution. man pw man

Perl book

2003-01-15 Thread Dylan Boudreau
I have already read Learning Perl and am looking to get another book to learn more what would people recommend? Thanks, Dylan

RE: printing number with commas in it

2003-01-15 Thread Westgate, Jared
Reggie Wrote: > > I am trying to print a number with commas in it. I cannot > find the correct syntax to do this with printf. > I considered using the substr function but this depends on > mealways knowing the size of the number. > Can you help me with this? I like to use the method listed in t

RE: printing number with commas in it

2003-01-15 Thread Dan Muey
> Hi Reggie! > > > -Original Message- > > From: Johnson, Reginald (ECCS) [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 14, 2003 11:32 AM > > To: '[EMAIL PROTECTED]' > > Subject: printing number with commas in it > > > > > > I am trying to print a number with commas in it. I canno

RE: printing number with commas in it

2003-01-15 Thread Dan Muey
Disregard my last post! That was the regex of the day to replace the one in that commati routine. Works like a charm. Dan > -Original Message- > From: Westgate, Jared [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 9:18 AM > To: Johnson, Reginald (ECCS) > Cc: [EMAIL PROTE

RE: printing number with commas in it

2003-01-15 Thread Dan Muey
> -Original Message- > From: Dan Muey > Sent: Wednesday, January 15, 2003 9:19 AM > To: Beau E. Cox; Johnson, Reginald (ECCS); [EMAIL PROTECTED] > Subject: RE: printing number with commas in it > > > > Hi Reggie! > > > > > -Original Message- > > > From: Johnson, Reginald (ECCS

RE: Perl book

2003-01-15 Thread Paul Kraus
Programming Perl by Oreilly > -Original Message- > From: Dylan Boudreau [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 10:06 AM > To: [EMAIL PROTECTED] > Subject: Perl book > > > I have already read Learning Perl and am looking to get > another book to learn more what w

RE: Perl book

2003-01-15 Thread Beau E. Cox
HI - > -Original Message- > From: Dylan Boudreau [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 5:06 AM > To: [EMAIL PROTECTED] > Subject: Perl book > > > I have already read Learning Perl and am looking to get another book to > learn more what would people recommend? >

RE: pipe in perl ???

2003-01-15 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > i need to translate the following commandline to perl: > > (echo "set term post"; echo "plot '-' w l"; cat data) | gnuplot > > data.ps open(F, "| gnuplot >data.ps") or die $!; print F "set term post\n", "plot '-' w l\n"; print "$_\n" for @commands; close F

RE: pipe in perl ???

2003-01-15 Thread Bob Showalter
Bob Showalter wrote: > [EMAIL PROTECTED] wrote: > > i need to translate the following commandline to perl: > > > > (echo "set term post"; echo "plot '-' w l"; cat data) | gnuplot > > > data.ps > >open(F, "| gnuplot >data.ps") or die $!; >print F "set term post\n", "plot '-' w l\n"; >p

RE: Perl book

2003-01-15 Thread Dan Muey
The black books are very nice. I like them better than the Orielly ones. Not to start a flame war, I just like em better. Also there's the 'using perl' for specifci jobs, system admin, web programming, database, algorythms, etc Can't remember the publisher off hand, sorry. Depends on what you

Re: Perl book

2003-01-15 Thread Ben Siders
My Perl libary consists of Learning Perl, Programming Perl, The Perl Cookbook, Advanced Perl Programming, and I just ordered the DBI book. Most people probably don't need all those, and I probably wouldn't have them all if I hadn't received most of them during some professional training classes

RE: Perl book

2003-01-15 Thread Dylan Boudreau
I am a network administrator maintaining strictly Unix boxes of some type or another. I want to become as proficient at Perl as I possibly can because I see scripting as the week point on my resume. I have the Oreilly book "Perl for System Administrators" but I want to read another book before I

RE: printing number with commas in it

2003-01-15 Thread Beau E. Cox
Hey Reggie - why are your messages getting posted 2,3,or 4 times? > -Original Message- > From: Dan Muey [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 5:26 AM > To: Dan Muey; Beau E. Cox; Johnson, Reginald (ECCS); [EMAIL PROTECTED] > Subject: RE: printing number with commas

Re: Perl book

2003-01-15 Thread Jostein Berntsen
Hi, I think this book is very good with many useful examples: http://www.manning.com/cross/ and this is a good one too: http://vig.prenhall.com/catalog/academic/product/1,4096,0130282510,00.html Read, code and enjoy! Jostein > I have already read Learning Perl and am looking to get another b

Re: pipe in perl ???

2003-01-15 Thread Martin A. Hansen
On Wed, Jan 15, 2003 at 10:33:45AM -0500, Bob Showalter wrote: > Bob Showalter wrote: > > [EMAIL PROTECTED] wrote: > > > i need to translate the following commandline to perl: > > > > > > (echo "set term post"; echo "plot '-' w l"; cat data) | gnuplot > > > > data.ps > > > >open(F, "| gnuplot

RE: Perl book

2003-01-15 Thread Dan Muey
I'd say go to the library then and check out some books ( have them get them other libraries if they don't have them ) and when you find one you jive with go buy it. I love 'The Black Book of Perl' and have learned most all I do from it and I to do a lot of Unix Administration. One reason I di

RE: Perl book

2003-01-15 Thread wiggins
On Wed, 15 Jan 2003 11:39:04 -0400, "Dylan Boudreau" <[EMAIL PROTECTED]> wrote: > I am a network administrator maintaining strictly Unix boxes of some > type or another. I want to become as proficient at Perl as I possibly > can because I see scri

RE: Perl book

2003-01-15 Thread Paul Kraus
According to Amazon the Perl black book is out of print. :( you got me all hyped about checking it out :) > -Original Message- > From: Dan Muey [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 11:12 AM > To: Dylan Boudreau; [EMAIL PROTECTED] > Subject: RE: Perl book > > >

RE: Perl book

2003-01-15 Thread Dan Muey
> According to Amazon the Perl black book is out of print. :( That's a crime! > you got me all hyped about checking it out :) Sorry :) I get feverish on occasion about stuff. Maybe I should be in sales? N > > > -Original Message- > > From: Dan Muey [mailto:[EMAIL PROTECTED]] > > S

OSX Aqua and Perl

2003-01-15 Thread Brian Ling
Hi all, Does anyone know a way of creating GUI interfaces directly from Perl, that will work with OS X's native Aqua interface? Thanks for any info. Brian BBCi at http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views

RE: Perl book

2003-01-15 Thread Dan Muey
> > On Wed, 15 Jan 2003 11:39:04 -0400, "Dylan Boudreau" > <[EMAIL PROTECTED]> wrote: > > > I am a network administrator maintaining strictly Unix > boxes of some > > type or another. I want to become as proficient at Perl as > I possibly > >

RE: Perl book

2003-01-15 Thread Dylan Boudreau
It is out of print according to amazon.com but if you check chapters.ca it is listed as being available and shipped within 24 hrs. Dylan -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: January 15, 2003 12:21 PM To: 'Dan Muey'; 'Dylan Boudreau'; [EMAIL PROTECTED] Subj

RE: Perl book

2003-01-15 Thread Dan Muey
It may be 'Perl Black Book' actually, I don't have it with me right now but I'll get the info and post it later today. There's a whole series of 'Balck Books' for different programming languages and stuff. An excellent reference but also better learning tools because of example situations for t

RE: OSX Aqua and Perl

2003-01-15 Thread Dan Muey
> Hi all, > > Does anyone know a way of creating GUI interfaces directly > from Perl, that will work with OS X's native Aqua interface? Good question! If not we need to get someone on it asap. OS X is awesome! Unix and mac and microsoft free!!! Oh what a wonderful thing! I've wondered this mys

RE: Local Apache Server and CGI?

2003-01-15 Thread Ben Crane
Hi list, Please forgive what must be seen as amazingly naive! I have just managed to get an apache server loaded locally (so I can test my scripts/etc) without putting them on our corporate server all the time. Now I've managed to get php to work...but a simple *.cgi script that prints "script wor

Re: Network Administration and Perl

2003-01-15 Thread Brian McGraw
1. Log into FTP and get new AV dats, if a new version is posted. 2. Securely copy logs from one network to another for analysis. (Thanks File::Remote) 3. Consolidate account creation process. (Creating accounts for services while creating user accounts). 4. >>> "Paul Kraus" <[EMAIL PROTECTED]> 0

RE: Local Apache Server and CGI?

2003-01-15 Thread Dan Muey
Are the .cgi scripts perl? Is .cgi associated with perl? Do they work if you use .pl instead? Do they work if you run them form the dos prompt? Are they executable ( not sure about how windows does that ) ? Do you need the Exec cgi directive in Apache for that directory or for a cgi-bin direc

Re: Perl book

2003-01-15 Thread Ben Siders
I generally like the O'Reilly Perl books, and I've had good luck with them. I can't use them as my only Perl reference, though. I don't pick up the condescending tone in them that you seem to have, but I definately agree that they're overrated. The Perl books, in general, are excellent, but

RE: Perl book

2003-01-15 Thread Paul Kraus
WOW the black book is almost 70 bucks!!! BUT CHECK THIS OUT. Amazon has it used for around 10 bucks with the CD woo who!! > -Original Message- > From: Dan Muey [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 11:25 AM > To: [EMAIL PROTECTED]; Dylan Boudreau; [EMAIL PROTECTED

Checking to see if input has valid data.

2003-01-15 Thread Dylan Boudreau
The input must be an email address and I am checking it the following way: print "Enter an address to replace: "; chomp (my $search = ); unless ($search =~ /@/){ die "Search field must be an email address!\n"; } print "Enter a replacement address: "; chomp

RE: Perl book

2003-01-15 Thread Dan Muey
> WOW the black book is almost 70 bucks!!! BUT CHECK THIS OUT. > Amazon has it used for around 10 bucks with the CD woo who!! $70? Mine was $20 but I think I got the smaller version, no CD The big one is still pretty sexxy though from what I've seen of it It may be worth $70 but if you can get it

Create Text File

2003-01-15 Thread [EMAIL PROTECTED]
Hello all, I need to create a .txt file and then print some text to it Does anyone know how to do this? Thanks in advance... Kurt

RE: Local Apache Server and CGI?

2003-01-15 Thread Dan Muey
> -Original Message- > From: Ben Crane [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 10:55 AM > To: Dan Muey > Subject: RE: Local Apache Server and CGI? > > > > --- Dan Muey <[EMAIL PROTECTED]> wrote: > > Are the .cgi scripts perl? > *YES > > Is .cgi associated

Re: Perl book

2003-01-15 Thread Robbie Staufer
There is a pink and a blue camel book from O'Reilly. What is the difference, and which comes most highly recommended? Robbie -- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Robbie Staufer NCAR/SCD 1850 Table Mesa Dr. Rm. 42 Boulder, CO. 80305 (303) 497-1836 -- To unsubscribe, e-mail:

RE: Checking to see if input has valid data.

2003-01-15 Thread Dan Muey
=~ m/^(\w+).*\(\w+)@(\w+).*\.(\w+)$/ Would match [EMAIL PROTECTED] [EMAIL PROTECTED] But not joemama@joemam Or [EMAIL PROTECTED] There is even a better way to do it instead of the .* which will match Joemama~$%&*(()_)+=-:"{}|?> -Original Message- > From: Dylan Boudreau [mailto:[EMAIL PR

RE: Create Text File

2003-01-15 Thread Paul Kraus
#!/usr/bin/perl -w open TEXT,"mytext.txt"; print TEXT "add some text to text file\n"; print TEXT "add some more text to text file\n"; close TEXT; > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 12:06 PM > To: [EMAIL PROTECTE

RE: Create Text File

2003-01-15 Thread Dan Muey
Use open() to open a file for writing and it will be created automatically. open(FILE, '>file.txt'); print FILE $stuff; close(FILE); perldoc -f open > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 11:06 AM > To: [EMAIL PRO

RE: Create Text File

2003-01-15 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: > Hello all, > > I need to create a .txt file and then print some text to it > Does anyone know how to do this? > > Thanks in advance... > Kurt By opening, printing, you will have a text file: open(MYTEXTFILE, ">text.txt") || die "Unable to o

RE: Local Apache Server and CGI?

2003-01-15 Thread Bob Showalter
Ben Crane wrote: > ... a simple *.cgi script > that prints "script working" suddenly prints the > contents of the program, i.e: apache isn't seeing > *.cgi as a script and is dumping it as a txt file onto the browser... You have to configure Apache through the httpd.conf to treat specific director

RE: Perl book

2003-01-15 Thread Ken Lehman
Pink is first edition, blue is second edition, i think there is a third edition out now, may as well go for the latest and greatest -Ken -Original Message- From: Robbie Staufer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 15, 2003 12:20 PM To: [EMAIL PROTECTED] Subject: Re: Perl boo

RE: Checking to see if input has valid data.

2003-01-15 Thread Bob Showalter
Dylan Boudreau wrote: > The input must be an email address and I am checking it the following > way: [snip] > This does work but I am sure there must be a better way. The whole > program is a search and replace utility for email addresses on all our > mailing lists so when someone changes their

RE: Perl book

2003-01-15 Thread Dan Muey
> There is a pink and a blue camel book from O'Reilly. What is > the difference, and which comes most highly recommended? One is for boys and one is for girls. Sorry I couldn't resist! Are they the same title? If so probably the newest one would be more up to date. > > Robbie -- To unsubscr

Re: How 'global' are STDIN/STDOUT/STDERR?

2003-01-15 Thread Mark Goland
Threads share U area , thats where file descripters are stored for your process. All threads are in one process. I sedjest using semaphors for contolling access to any resources. Mark - Original Message - From: "Beau E. Cox" <[EMAIL PROTECTED]> To: "'Beginners" <[EMAIL PROTECTED]> Sent: We

waitpid

2003-01-15 Thread Mark Goland
Hello Perl lovers, I am developing a script which runs in TCSH 6.x shell. I have two questions 1. I need to be able to set an global enviernment variable. The shell has a build in command setenv which would enable me to do what I need. This is what I try, system("setenv DESTDIR /mnt"); ...but

Re: ppm: No suitable installation target for package G

2003-01-15 Thread Jenda Krynicky
From: "David Eason" <[EMAIL PROTECTED]> > Thanks! Now I have another problem. > > Is there a ppm repository for File-DosGlob or do I need to figure out > how to get the cpan shell working in Windows? File::DosGlob is part of the core. I've removed the dependency from the .ppd file, could you try

Re: Checking to see if input has valid data.

2003-01-15 Thread [EMAIL PROTECTED]
I use this for email verification $str =~ /^[^@]+@[^.]+\.[^.]/); - Original Message - From: "Dylan Boudreau" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 11:57 AM Subject: Checking to see if input has valid data. > The input must be an email addres

RE: Local Apache Server and CGI?

2003-01-15 Thread wiggins
On Wed, 15 Jan 2003 10:47:45 -0600, "Dan Muey" <[EMAIL PROTECTED]> wrote: > Are the .cgi scripts perl? > > Is .cgi associated with perl? > > Do they work if you use .pl instead? > > Do they work if you run them form the dos prompt? > > Are they

Re: printing number with commas in it

2003-01-15 Thread Jenda Krynicky
From: "Johnson, Reginald (ECCS)" <[EMAIL PROTECTED]> > I am trying to print a number with commas in it. I cannot find the > correct syntax to do this with printf. I considered using the substr > function but this depends on mealways knowing the size of the number. > Can you help me with this?

Script that runs on my Win98 box and the Unix server

2003-01-15 Thread Rob Richardson
Greetings! I have been using my Win98 box to modify some scripts that will be run on a Unix server. Within the body of the script, I can surround OS-specific things like test code I want my machine to execute and calls that throw errors under Win98 like flock() with checks to see what operating s

RE: How 'global' are STDIN/STDOUT/STDERR?

2003-01-15 Thread Beau E. Cox
Thanks Mark - I thought maybe that was the case... well now I have to evaluate the performance penality and look into my other options, Aloha => Beau; > -Original Message- > From: Mark Goland [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 7:43 AM > To: Beau E. Cox > Cc: per

RE: waitpid

2003-01-15 Thread Beau E. Cox
Hi - > -Original Message- > From: Mark Goland [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 7:56 AM > To: perl > Subject: waitpid > > > Hello Perl lovers, > > I am developing a script which runs in TCSH 6.x shell. I have > two questions > > 1. I need to be able to s

Re: How 'global' are STDIN/STDOUT/STDERR?

2003-01-15 Thread Mark Goland
> Thanks Mark - I thought maybe that was the case... > well now I have to evaluate the performance penality > and look into my other options, Aloha => Beau; Good Luck, if Threads are well implemented they should be flying fast in general. Mark - Original Message - From: "Beau E. Cox" <[EM

Re: waitpid

2003-01-15 Thread Mark Goland
> 2. system ($cmd) and `$cmd` do _wait_ for the command to > finish before returing (the difference being system retuns > the command's return code and `` returns the output). A > series of these should do what you want. thats what I though, but aparently thats not the case. This maybe do t

RE: Script that runs on my Win98 box and the Unix server

2003-01-15 Thread Beau E. Cox
Hi - > -Original Message- > From: Rob Richardson [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 8:23 AM > To: [EMAIL PROTECTED] > Subject: Script that runs on my Win98 box and the Unix server > > > Greetings! > > I have been using my Win98 box to modify some scripts that wi

RE: waitpid

2003-01-15 Thread wiggins
On Wed, 15 Jan 2003 12:55:39 -0500, Mark Goland <[EMAIL PROTECTED]> wrote: > Hello Perl lovers, > > I am developing a script which runs in TCSH 6.x shell. I have two questions > Remember your script runs in Perl not in the shell, you run the pe

Re: Checking to see if input has valid data.

2003-01-15 Thread Ben Siders
The quest for an email validation script is becoming ancient and legendary. I'm sure somebody else already has sounded off on this, but the short answer is that there's no sure-way to validate email. There's any number of potential problems: 1. The email address does not conform to the RFC 2.

RE: Script that runs on my Win98 box and the Unix server

2003-01-15 Thread Rob Richardson
Beau, Perhaps then my question would have been better to ask on the CGI list. The script in question is a CGI script being executed through Internet Explorer and Apache. When the first line of my script is "#!perl", the script executes as desired. When the first line is "#!usr/bin/perl", the re

RE: Create Text File

2003-01-15 Thread Jakob Kofoed
Hi there, Just another way to do it! Cheers, Jakob #!/usr/bin/perl -w open FILE, ">", yourfile.dat; print FILE

RE: Script that runs on my Win98 box and the Unix server

2003-01-15 Thread Beau E. Cox
> -Original Message- > From: Rob Richardson [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 9:05 AM > To: [EMAIL PROTECTED] > Subject: RE: Script that runs on my Win98 box and the Unix server > > > Beau, > > Perhaps then my question would have been better to ask on the C

question regarding a query agains a text file

2003-01-15 Thread Le Blanc, Kerry (Kerry)
Greetings, Here is my question. In the below code I have the user enter in a part number and revision. These are then written into a text file. All this works as it should. The next step that I want to get to is this. When the user enters the part number and revision I would like the script to

Re: Random Number Generation

2003-01-15 Thread Christopher D . Lewis
On Wednesday, January 15, 2003, at 08:28 AM, Maurice O'Prey wrote: How do I extract a whole number from the rand function. int() is your friend, if you want an integer from rand. I am using rand 25000; which generates a random number with many decimal places, e.g. 16235.2587965, I need a wh

RE: printing number with commas in it

2003-01-15 Thread Danny Grzenda
here a sub that i use. $number = 123456 ; $number = commify($number) ; sub commify { local($_) = shift; 1 while s/^(-?\d+)(\d{3})/$1,$2/; return $_; } -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 15, 2003 12:21 PM To: '[EMAIL PR

RE: question regarding a query agains a text file

2003-01-15 Thread Dan Muey
> -Original Message- > From: Le Blanc, Kerry (Kerry) [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 1:39 PM > To: '[EMAIL PROTECTED]' > Cc: Le Blanc, Kerry (Kerry) > Subject: question regarding a query agains a text file > > > Greetings, > > Here is my question. In th

RE: question regarding a query agains a text file

2003-01-15 Thread Le Blanc, Kerry (Kerry)
Kerry LeBlanc Materials Auditor Process Owner 75 Perseverence Way Hyannis, MA. 02601 1-508-862-3082 http://www.vsf.cape.com/~bismark #make sure $part_num is formatted correctly to keep someone form doing bad things with the backtick execution I am not familiar with the term backtick s

RE: question regarding a query agains a text file

2003-01-15 Thread Dan Muey
> Kerry LeBlanc > Materials Auditor > Process Owner > 75 Perseverence Way > Hyannis, MA. 02601 > 1-508-862-3082 > http://www.vsf.cape.com/~bismark > > > > #make sure $part_num is formatted correctly to keep someone > form doing bad things with the backtick execution > > I am not familia

Escaping Ampersands in XML

2003-01-15 Thread Ben Siders
I've got a real easy one here (in theory). I have some XML files that were generated by a program, but generated imperfectly. There's some naked ampersands that need to be converted to &. I need a regexp that will detect them and change them. Sounds easy enough. The pattern I want to match

Adding to multi-dimensional array dynamically via push...

2003-01-15 Thread Liss, Mike
Hello, I would like to know if it is possible to do somthing like this: ( I know I can't do it this way as Perl barfs when I tried it ) $SizeOfMyArray = 2; $MyArray[ $SizeOfMyArray ]; push( @MyArray[ 0 ], 0 ); << --- complains here with < ERROR > (see below ) push( @MyArray[ 1

Retriving a file using cgi posted from a html form

2003-01-15 Thread LRMK
how do I retrieve & save files that has been posted from a Html form to my cgi script. please send a piece of example code

Re: Retriving a file using cgi posted from a html form

2003-01-15 Thread fliptop
On Wed, 15 Jan 2003 at 22:32, LRMK opined: L:how do I retrieve & save files that has been posted from a Html form to L:my cgi script. have you read 'perldoc CGI'? L:please send a piece of example code from 'perldoc CGI' (for a plain text file): $fh = $query->upload('uploaded_file');

floating-point number on the right side with sprintf

2003-01-15 Thread Konrad Foerstner
Hi, I have a problem with formating my output. I use sprintf to format a floating-point number. My output with "%.4f" looks like this: 111.5611 21.4870 10.7046 8.8443 8.6823 but I would like to see it that way: 111.5611 21.4870 10.7046 8.8443 8.6823 So, a kind of combin

RE: floating-point number on the right side with sprintf

2003-01-15 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Konrad Foerstner wrote: > Hi, > > I have a problem with formating my output. I use sprintf to format a > floating-point number. My output with "%.4f" looks like this: > > 111.5611 > 21.4870 > 10.7046 > 8.8443 > 8.6823 > > but I would like to see it that way: > > 111.5611 > 21.4870 > 10.7046 >

RE: Adding to multi-dimensional array dynamically via push...

2003-01-15 Thread Mark Anderson
> I would like to know if it is possible to do somthing like this: > ( I know I can't do it this way as Perl barfs when I tried it ) > > $SizeOfMyArray = 2; > > $MyArray[ $SizeOfMyArray ]; Why are you trying to define the size of your array? > push( @MyArray[ 0 ], 0 ); << --- complains

  1   2   >