RE: checking parameters ...

2002-09-26 Thread Sudarshan Raghavan
On Fri, 27 Sep 2002, Anurag K. Singh wrote: > use or instead of && like : > > if (($ARGV[0] eq "") or ($ARGV[1] eq "") or ($ARGV[2] eq "")) { > print "You must give me 3 parameters\n"; > exit > } > > It works for me. 1) If I were to use your program how would I pass an empty strin

RE: Hide a string while saving it to file

2002-09-26 Thread NYIMI Jose (BMB)
> -Original Message- > From: david [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 8:41 PM > To: [EMAIL PROTECTED] > Subject: Re: Hide a string while saving it to file > > > Nyimi Jose wrote: > > > I have a string (ascii). > > I would like to apply a rule on it before s

Searching & Storing

2002-09-26 Thread Henry Wong
Hi all, I am wondering if you guys can help me out here: I have a log file containing information like this: THU DEC 6 14:55:00 2001111222333444 FRI DEC 7 01:00:00 2001 555666777888 SAT DEC 8 13:00:00 2001xxxxxxxxxxxx SUN DEC 9 04:00:00 2001xxx

RE: checking parameters ...

2002-09-26 Thread Anurag K. Singh
use or instead of && like : if (($ARGV[0] eq "") or ($ARGV[1] eq "") or ($ARGV[2] eq "")) { print "You must give me 3 parameters\n"; exit } It works for me. Thanks Anurag Kumar Singh AMDOCS DEVELOPMENT LTD. Limassol , Cyprus. Phone: +357-25-845384(O) -Original Message-

Re: system call troubles...

2002-09-26 Thread Sudarshan Raghavan
On Thu, 26 Sep 2002, Chris (?) wrote: > Hello world! > > I've found myself troubled with a very simple problem. Or.. at least what > should be a simple problem. > > If anyone can help me out, i'd greatly appreciate it. I've included my > code, in full; though it's not very long. > >

RE: File::Find

2002-09-26 Thread David Samuelsson (PAC)
Yes, this is what i found out aswell. So how do i go around this problem? should i try using another tactic? The script deletes all files first , that alters the -M on the directory, which means i have to delete the directoy first? but i cant do that if there is files in it, unless i am usin

system call troubles...

2002-09-26 Thread Chris (?)
Hello world! I've found myself troubled with a very simple problem. Or.. at least what should be a simple problem. If anyone can help me out, i'd greatly appreciate it. I've included my code, in full; though it's not very long. ## START OF CODE # # Coding w

Re: where to start... (urgent)

2002-09-26 Thread Dharmender Rai
start with Learning Perl and docs at www.perldocs.com .. --- waytech <[EMAIL PROTECTED]> wrote: > Hi, > > I am new to perl. But my frist task in the > > new company is to write a program using it. > > The program is to prevent password protected > > website from password sharing. > >

A little more help on the sorting problem from today

2002-09-26 Thread Steveo
Consider the following form submission data (partial data): match date: September 29 map: Heutau Match 1 USN - 341 (winner) 1st PD - 204 Match 2 GD - 404(winner) RMPZ|SS - 136 Match 3 ITF - 292 RsR - 296(winner) which is sent through a perl script and creates the foll

RE: dbmopen can't open /etc/aliases.db file

2002-09-26 Thread nkuipers
Why is the third parameter in your dbmopen call undef? The example in perldoc -f dbmopen is almost identical to yours except that it defines that third parm as 0666. If the dbmfile does not already exist, it will be created with permissions specified by that third parm. >= Original Message

RE: "Or" Syntax

2002-09-26 Thread Mark Anderson
Hopefully someone more familiar with perl dB calls will be able to help with this. If I were trying to debug it, I would: * put a print statement after the line where you assign to the $date variable and before the first if statement, so that you know that all of the records are being seen. * m

RE: output to console and to logfile.

2002-09-26 Thread Timothy Johnson
The easiest way I've found: Tee("This is the text I want.\n"); sub Tee{ print OUTFILE @_; print @_; } -Original Message- From: Peter Lemus [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 5:41 PM To: [EMAIL PROTECTED] Subject: output to console and to logfile. Hi, fo

output to console and to logfile.

2002-09-26 Thread Peter Lemus
Hi, folks, I have a scripts that prints to a log file. I would like to receive all messages on my terminal also when the script runs. Please enlight me...thanks. The scripts looks something like this... #MAIN #--- open (STDOUT, ">> $LOGFILE"); &getd

RE: "Or" Syntax

2002-09-26 Thread Lance Prais
Please let me know if you have any questions' # get solutions Id that are Alerts my $alert = $dbh->prepare(q{SELECT nvl((a.pc_solution_id),0), a.pc_title, d.pc_enum_value, b.pc_date_created FROM pt_solution a, pt_solution_prop b, pt_prop_enum_values c, pt_prop_enum_values d, p

dbmopen can't open /etc/aliases.db file

2002-09-26 Thread Bruno Negrao - Perl List
Hi, I'm triyng to open the /etc/aliases.db file for reading with the dbmopen function - the result is that I can't open the file for reading, or something like this. yes, I have permission because I'm root. My script is: #!/usr/bin/perl -w use diagnostics; dbmopen(%ALIAS,'/etc/aliases',undef) ||

Re: "Or" Syntax

2002-09-26 Thread James Edward Gray II
Could you post the important part of your code, please? James On Thursday, September 26, 2002, at 07:26 PM, Lance Prais wrote: > Hello and thanks for your help. It still does not seem to be working > as I > expect maybe I am assuming I am not explaining myself correctly. Let > me > try on

RE: "Or" Syntax

2002-09-26 Thread david
Lance Prais wrote: > Hello and thanks for your help. It still does not seem to be working as I > expect maybe I am assuming I am not explaining myself correctly. Let me > try one more time and see if what happens. > > I am reading this file and have assigned the array[2] as $partition. can y

Re: How to get file version?

2002-09-26 Thread James Edward Gray II
Could you be more specific about what you mean by "version"? You mean for an executable? James On Thursday, September 26, 2002, at 07:23 PM, Le, Ha (OPB) wrote: > I read in a but I don't know how get the file version out > of the file. It seems Perl stat() doesn't work this way. Anybody

RE: "Or" Syntax

2002-09-26 Thread Lance Prais
Hello and thanks for your help. It still does not seem to be working as I expect maybe I am assuming I am not explaining myself correctly. Let me try one more time and see if what happens. I am reading this file and have assigned the array[2] as $partition. sk5719::Is Automatic ARP supported

Re: How to get file version?

2002-09-26 Thread david
Ha Le wrote: > I read in a but I don't know how get the file version out of > the file. It seems Perl stat() doesn't work this way. Anybody knows what > Perl function or module will work? > what file version do you refer to? david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

How to get file version?

2002-09-26 Thread Le, Ha (OPB)
I read in a but I don't know how get the file version out of the file. It seems Perl stat() doesn't work this way. Anybody knows what Perl function or module will work? Thanks, HL -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Preferred way to move and compress a file

2002-09-26 Thread Michael Fowler
On Thu, Sep 26, 2002 at 03:02:04PM -0700, Matt Simonsen wrote: > I need to move several files Moving files can be accomplish with rename, perldoc -f rename. > and compress them - what's the preferred way to do this? It depends on your requirements, there is no single preferred method. Compres

RE: "Or" Syntax

2002-09-26 Thread Mark Anderson
If you are comparing numbers, you want to use == (strings use eq). You probably also only want to have one set of parens: if ($a == $b || $a == $c || $a == $d) {print "here"} or you could clarify further: if (($a == $b) || ($a == $c) || ($a == $d)) {print "here"} You should put the following lin

RE: "Or" Syntax

2002-09-26 Thread nkuipers
>If ($a=b) || ($a=c) || ($a=d) That almost looks right. I believe this will do it: if ( $a == $b || $a == $c || $a == $c ) { ... } or, for non-numerics: if ( $a eq $b || ... ) { ... } Cheers, Nathanael -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

Re: Permission Problems

2002-09-26 Thread Michael Fowler
On Thu, Sep 26, 2002 at 11:16:46AM -1000, Korthrun wrote: > The file name is /usr/local/apache/htdocs/fooness.cfg > The script runs from /usr/local/apache/cgi-bin/add_mrtg.pl > the string I am using is: > system "perl -p -i -e 's! END DSL BUSINESS ACCOUNTS > #!$profile\n###

"Or" Syntax

2002-09-26 Thread Lance Prais
If I wanted to say: If a=b or a=c or a=d do this How would I do that? I thought I could do it like this but it did not work. 1. If ($a=b) || ($a=c) || ($a=d) { DO this } 2. If ($a=b) || if ($a=c) || if ($a=d) { DO this } Could someone tell help me with this? Thanks in advance Lanc

Re: Please Recommend a chart module

2002-09-26 Thread Nelson Goforth
Since I don't have root access to my server I'm limited in what modules are available (without nagging the admin folks). I use GD and roll my own charting code. I'd love to have access to GD::Graph and GD::Graph::3D, but that's the way it goes. I've created bar, column and 'radar' charts via

Re: Sun Sparcstation 20 and Perl?

2002-09-26 Thread Kevin Pfeiffer
Hi, You'll remember... > Kevin Pfeiffer wrote: > > A colleague has a Sun Sparcstation 20 for sale. He says it will run > > linux. I was thinking it might be a good project machine for running an > > Apache server, trying out some cgi scripts, Perl, etc. Thanks to everyone who answered. I've got

Re: Using a variable name to invoke a subroutine

2002-09-26 Thread drieux
On Tuesday, Sep 24, 2002, at 11:11 US/Pacific, nkuipers wrote: >> foreach $sub (@list_of_subs) { >> &{$sub}; ##-- this is the part I am stuck on. This doesn't work >> } > > I don't know the answer to your question; I'm also interested in what > others > have to say. However, I have to w

Re: Preferred way to move and compress a file

2002-09-26 Thread david
Matt Simonsen wrote: > I need to move several files and compress them - what's the preferred > way to do this? I don't think Zlib::Compress is what I want, it seems > more geared towards dealing with small streams... although I suppose I > could look over each line and write that out. > > The fi

RE: Preferred way to move and compress a file

2002-09-26 Thread Timothy Johnson
There is also an Archive::Zip module that works quite well. -Original Message- From: Matt Simonsen [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 3:02 PM To: [EMAIL PROTECTED] Subject: Preferred way to move and compress a file I need to move several files and compress th

Re: Preferred way to move and compress a file

2002-09-26 Thread George Schlossnagle
Matt Simonsen wrote: >I need to move several files and compress them - what's the preferred >way to do this? I don't think Zlib::Compress is what I want, it seems >more geared towards dealing with small streams... although I suppose I >could look over each line and write that out. > >The files t

Re: Help with including a counter

2002-09-26 Thread david
Lance Prais wrote: > > open (WHATSNEWFILE, "< $whats_new_index_txt_filename") || die "can't > open $file: $!"; > > while () { > chomp; > $file_line = $_; > $file_line =~ s/[\t\n\e\f\r]//g; > if ($file_line eq "") { > last; #break > } > if ($li

Preferred way to move and compress a file

2002-09-26 Thread Matt Simonsen
I need to move several files and compress them - what's the preferred way to do this? I don't think Zlib::Compress is what I want, it seems more geared towards dealing with small streams... although I suppose I could look over each line and write that out. The files to compress are all several h

Re: use perl to trim out non text characters from a file

2002-09-26 Thread Korthrun
Assuming that you are on a *nix box you can open the file in ex and strip it example: I want to take all the ^M's out of a file. root - local#ex somefile.ext 1,$s/.^M//g[enter] w [enter] of course you have to replace ^M with that crazy acii character. try cutting and pasting if you cant

Help with including a counter

2002-09-26 Thread Lance Prais
I am trying to output the first 20 lines of a .txt document with the following code. This is working correcting, which brings me to the next issue that I cannot solve. As you will notice, I have a counter and would like to include the counter in my html output For example: 1. Title Icon 2. Title

Re: How to execute a Perl script from a web page?

2002-09-26 Thread david
Brady Fausett wrote: > All, > > I have written a perl program (OO) that parses files, and then puts them > into a database. What I have been trying to do, unsuccessfully even after > reading a ton the last week, is execute the script to parse the files > located in a directory on the server by

Permission Problems

2002-09-26 Thread Korthrun
I had recently posted a script that was to add customers to a bandwidth graphing utility (titled "Funkyness about escaping an @), and I would like to thank the people who posted. And FYI triple escaping the @ was the answer. Now I am having a problem with file permissions. Run from the com

RE: Please Recommend a chart module

2002-09-26 Thread beckhale
Greetings from East Tennessee, USA. I've had luck with the GD module. > -Original Message- > From: Paul Johnson [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 1:34 PM > To: Quincy Ntuli > Cc: [EMAIL PROTECTED] > Subject: Re: Please Recommend a chart module > > O

Re: Please Recommend a chart module

2002-09-26 Thread Paul Johnson
On Thu, Sep 26, 2002 at 10:21:41AM +0200, Quincy Ntuli wrote: > Greetings from Sunny South Africa. Greetings from wet Switzerland. > Could someone please recommend a chart module ? Sorry, I can't. > I wonder if there is a rating system out there to rate perl modules > that do more or less sim

Re: checking parameters ...

2002-09-26 Thread Michael Fowler
On Thu, Sep 26, 2002 at 07:30:37AM -0700, Admin-Stress wrote: > I can use "if (scalar(@ARGV) < 3) {...}" but that not the case. If the user executes the program like so: program.pl foo bar @ARGV will have 2 elements. If the user executes the program like so: program.pl "" "" "" @ARGV

Re: Determining highest common factor using Perl

2002-09-26 Thread Paul Johnson
On Thu, Sep 26, 2002 at 10:32:25AM +0200, Janek Schleicher wrote: > Jeff Aa wrote at Thu, 26 Sep 2002 10:52:46 +0200: > > > I need to determine the highest common factor for a series of integers. > > I have scribed an initial stab included below - does anyone have a > > better HCF implementation,

Re: Hide a string while saving it to file

2002-09-26 Thread Michael Fowler
On Thu, Sep 26, 2002 at 04:07:20PM +0200, NYIMI Jose (BMB) wrote: > I have a string (ascii). > I would like to apply a rule on it before saving it to a file -> coding > ... And apply the same rule to get the original string while reading from > the file -> decoding ... > > Any Idea ? I don't und

Re: fork exitting sub

2002-09-26 Thread Michael Fowler
Others have addressed various other parts of your code, such as why you're forking twice, what the while loop is for, etc. However, there are a few things in your code that others haven't addressed. On Thu, Sep 26, 2002 at 09:20:37AM -0400, chad kellerman wrote: [snip] > foreach my $usr (@users

Re: Read a file directly from system call?

2002-09-26 Thread John W. Krahn
Bill Akins wrote: > > Hi All, Hello, > I need to read in a file from a system call. I need to extract a file > (doc.txt) from a zip file ($myfile1) and read it directly in from a pipe > instead of writing to disk, then opening the file. My system call is: > system ("unzip $myfile1 doc.txt");

Debugging

2002-09-26 Thread Jessee Parker
Is there any way to use the perl debugger to step through a script that forks a child (step into the child I guess is what I am asking)? I have a script that forks a copy of itself to act as a daemon. I've noticed that when the script runs, the load average on the system steadily rises. Jessee

Re: fork exitting sub

2002-09-26 Thread david
Chad Kellerman wrote: > david, > > actually, without the while loop every user in the array gets forked > at one time. 500+ forks. I put the while loop in and it does one at a > time.. > maybe i am missing something but how is this: > foreach my $usr (@users) { > my $UsrPid; >

Re: My First Module Advice

2002-09-26 Thread Paul Johnson
On Wed, Sep 25, 2002 at 08:34:26PM -0400, Bob Showalter wrote: > > having said that, i do not mean that anyone should write a silly module > and > > submit it to CPAN > > Heck, there's even a namespace for *that* > > http://www.cpan.org/modules/by-module/Silly/ > > :~) Don't forget about the

Re: Read a file directly from system call?

2002-09-26 Thread david
Bill Akins wrote: > Hi All, > > I need to read in a file from a system call. I need to extract a file > (doc.txt) from a zip file ($myfile1) and read it directly in from a pipe > instead of writing to disk, then opening the file. My system call is: > system ("unzip $myfile1 doc.txt"); which wo

Re: Hi

2002-09-26 Thread david
Mark Schouten wrote: > > %flavors = ( change the above to: my %flavors = ( and try again. read the Perl book's scope section again :-) david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: fork exitting sub

2002-09-26 Thread chad kellerman
david, actually, without the while loop every user in the array gets forked at one time. 500+ forks. I put the while loop in and it does one at a time.. chad On Thu, 2002-09-26 at 14:28, david wrote: > Chad Kellerman wrote: > > > I have: > > > > foreach my $usr (@users) { > > my $

Re: Hide a string while saving it to file

2002-09-26 Thread david
Nyimi Jose wrote: > I have a string (ascii). > I would like to apply a rule on it before saving it to a file -> coding > ... And apply the same rule to get the original string while reading from > the file -> decoding ... > > Any Idea ? there are ency/decy modules in CPAN that you should check

Re: fork exitting sub

2002-09-26 Thread david
Chad Kellerman wrote: > I have: > > foreach my $usr (@users) { > my $UsrPid; > unless ($UsrPid = fork) { > while fork { > do stuff > exit 0; > } > exit 0; i don't understand why you need another 'while fork' her

RE: need some parsing ideas )

2002-09-26 Thread Steve
I am using Date::Manip to do my date/time differences. There may be something else but that's what I have used. At 12:31 PM 9/26/02 , you wrote: >Well here's an idea anyway... > >I wouldn't slurp the whole file at once, I would process line by line >assuming >all pertinent info per entry is a

RE: use perl to trim out non text characters from a file

2002-09-26 Thread david
Tim Booher wrote: > I don't know if they are truly "valid, printable characters". When a text > file show this type of information, isn't ascii just approximating some > binary data? > > Why I think this is if I open with notepad I get a file that looks like > the: ÿÿÿ described earl

How to execute a Perl script from a web page?

2002-09-26 Thread Brady Fausett
All, I have written a perl program (OO) that parses files, and then puts them into a database. What I have been trying to do, unsuccessfully even after reading a ton the last week, is execute the script to parse the files located in a directory on the server by clicking on a button and/or lin

Read a file directly from system call?

2002-09-26 Thread Bill Akins
Hi All, I need to read in a file from a system call. I need to extract a file (doc.txt) from a zip file ($myfile1) and read it directly in from a pipe instead of writing to disk, then opening the file. My system call is: system ("unzip $myfile1 doc.txt"); which works fine to extract the file

RE: a better way?

2002-09-26 Thread Jeff 'japhy' Pinyan
On Sep 26, Jerry Preston said: >I guess it an old 'c' habit. I do this to check each line for the item I am >looking for. > >I there a better way and why? my $found = 0;# have we found 'jeff'? while () { # reads ONE LINE at a time, and stores it in $_ if (/jeff/) { # if the line

Re: File::Find

2002-09-26 Thread Jenda Krynicky
From: "David Samuelsson (PAC)" <[EMAIL PROTECTED]> > i made a small script to clean out logfiles in a dir, actually its a > sub in a bigger script, but i get some toubles. Be carefull if you run > this script, cause it will delete files. It runs ok on files, but not > on directorys, my guess is t

RE: need some parsing ideas )

2002-09-26 Thread Mark Anderson
Unless you are sure that the threads won't be running around midnight, you should take the date into account as well. /\/\ark -Original Message- From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:08 AM To: '[EMAIL PROTECTED]' S

Content Management System - very newbie question

2002-09-26 Thread Eduardo Cancino
Hi Enlightened Ones... I need to build a website that has a classification like this h - human n - natural resources i - enviroment impact and then subclasses ie. h6 - health and then the object h6.1 - Aids For this I have every text in .rtf and I have a excel datasheet for the video in

Re: need some parsing ideas )

2002-09-26 Thread John W. Krahn
Ronald Yacketta wrote: > > I need to parse the following info and generate the total elapsed > time for each function call per thread. > > <09/25/02 20:03:31.974 [21168]>|thread: 6: start getContract > <09/25/02 20:03:32.296 [21168]>|thread: 6: end successful getContract > <09/25/02 20:0

RE: Hi

2002-09-26 Thread Kipp, James
the important thing is understanding why this is the case. a good read for you is 'perldoc perlsub' > -Original Message- > From: Mark Schouten [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 12:17 PM > To: Kipp, James > Cc: [EMAIL PROTECTED] > Subject: Re: Hi > > > On

RE: Key values for Win32::Lanman::NetServerEnum?

2002-09-26 Thread Timothy Johnson
If it works, post your code. I've run into that in the past, but just always had more important things come up when it came to trying to nail it down. -Original Message- From: Deans, Glenn [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:05 AM To: '[EMAIL PROTECTED]' Sub

RE: need some parsing ideas )

2002-09-26 Thread Yacketta, Ronald
O.K folks, got it 90% done, just unsure of the time difference piece what is out their that one could use to get the difference in time using the following format start: 20:08:13.765 end: 20:08:13.871 elapsed time: Regards, Ron -Original Message- From: Yacketta, Ronald Sent: Thursday

RE: Key values for Win32::Lanman::NetServerEnum?

2002-09-26 Thread Deans, Glenn
After checking thru MSDN some more I found this, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas e/setservicebits.asp, and wondered if the 'type' key was a sum of all of these possibilities? If that's the case then it's reporting the services found and therefore all o

Re: My First Module Advice

2002-09-26 Thread James Edward Gray II
Hate to reply to my own post here, but I'm also discussing these issues on comp.lang.perl.modules (see I did read the CPAN docs) and some people have asked me to post the module. I did that, so I just wanted to mention that it's up and welcome any and all feedback on code or documentation, if

RE: use perl to trim out non text characters from a file

2002-09-26 Thread Timothy Johnson
Sorry, my fault, that's what I get for responding that early in the morning. I was thinking of s/// the entire time. -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 7:19 AM To: Timothy Johnson Cc: 'Tim Booher'; [EMAIL PROTECTED]

RE: Key values for Win32::Lanman::NetServerEnum?

2002-09-26 Thread Timothy Johnson
Oh, yeah, I forgot. That one returns all computers that are running the workstation service... I suppose you could do a SV_TYPE_NT and then a SV_TYPE_SERVER_NT and only keep those that didn't show up in the servers... -Original Message- From: Deans, Glenn [mailto:[EMAIL PROTECTED]] Se

RE: need some parsing ideas )

2002-09-26 Thread Yacketta, Ronald
The issue I am now faced with is to find the end to each start call IE: <09/25/02 20:07:53.115 [21168]>|thread: 7: start getProducts getPruducts was started in thread 7 and would always end in thread 7, but it could be 10 - 15 lines further in the file. I have the following to get the info I n

RE: need some parsing ideas )

2002-09-26 Thread nkuipers
Well here's an idea anyway... I wouldn't slurp the whole file at once, I would process line by line assuming all pertinent info per entry is a 1-liner as shown. You could first split on | which gives portionA, portionB. For portionA, split on white space; the second field is the time. For por

Re: install modules via the internet

2002-09-26 Thread Janek Schleicher
Shaunn Johnson wrote at Thu, 26 Sep 2002 18:06:55 +0200: > Correct me if I'm wrong, but isn't there supposed to > be a way to have perl modules installed on your > system via some network / internet script? If so, > how can I get that info? Read perldoc -q install perldoc perlmodinstall Gre

Re: Hi

2002-09-26 Thread Mark Schouten
On Thu, Sep 26, 2002 at 12:11:26PM -0400, Kipp, James wrote: > declare %flavors, ie my %flavors. this is what use strict is for. read up > on scoping That's it indeed. Thanks! Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: checking parameters ...

2002-09-26 Thread John W. Krahn
Admin-Stress wrote: > > I wrote a simple script like this : > > #!/usr/bin/perl > > if (($ARGV[0] eq "") && ($ARGV[1] eq "") && ($ARGV[2] eg "")) { >print "You must give me 3 parameters\n"; >exit; > } > > Then, I tested like with 1 .. OR 2 ... OR 3 parameters, it did not print the text

RE: Hi

2002-09-26 Thread Kipp, James
declare %flavors, ie my %flavors. this is what use strict is for. read up on scoping > -Original Message- > From: Mark Schouten [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 11:47 AM > To: [EMAIL PROTECTED] > Subject: Hi > > > Hi, > > I'm a complete newbie, so have s

install modules via the internet

2002-09-26 Thread Johnson, Shaunn
Howdy: Correct me if I'm wrong, but isn't there supposed to be a way to have perl modules installed on your system via some network / internet script? If so, how can I get that info? Thanks! -X

RE: Extract alphanumeric characters not working . . .

2002-09-26 Thread Tim Booher
Thanks for the info, but I was trying to print the original data to the screen so I could make sure the program was working . . . my point was that this data, when printed, only gives the standard symbol of: ╨╧◄αí▒ As for the file with good data: test.txt.tmp it is completely empty. This tells m

RE: Perl DBI vs SQLPLUS

2002-09-26 Thread beckhale
Hello Bob: I ran explains ... got different execution paths and then discovered a "=" in one where clause and, in the other query, there was a "like" ... huge difference in Oracle performance. Thanks. That was a good process for isolating a problem. Those 2:00 A.M. efforts under the gun stil

RE: a better way?

2002-09-26 Thread Nikola Janceski
if you use an array you are using up memory. small files are okay for that.. but you can do it in the while loop without the array. But TIMTOWTDI. what are you checking for in the lines? Just an example will tell us what's best for your application. > -Original Message- > From: Jerry P

RE: a better way?

2002-09-26 Thread Jerry Preston
Jeff, I guess it an old 'c' habit. I do this to check each line for the item I am looking for. I there a better way and why? Thanks, Jerry -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:36 AM To: Jerry Preston Cc: Beginne

Re: sorting data (more than one scalar involved)

2002-09-26 Thread John W. Krahn
Steveo wrote: > > I understand how to sort $string1 and $string2 but I have something a > little more complicated (I think at least) and I've never done this > before. This is what my data looks like (flat ascii file) > > (clan, wins, losses, points for, points against) > > dod,4,3,700,400 > c

Hi

2002-09-26 Thread Mark Schouten
Hi, I'm a complete newbie, so have some patience. :) Im walking through the book 'Learning Perl' by O'Reilly and I'm allready in a small problem. I'm trying to compile the following: #!/usr/bin/perl -w ## cgi-bin/ice_cream: program to answer and generate ice cream ## order

RE: a better way?

2002-09-26 Thread Nikola Janceski
maybe the file has perl code and intends to: eval{ @lines }; for some wacky reason. I am sure you can remember your early perl days when you read files into arrays because it was "cool" and easy. :^P > -Original Message- > From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] > Sent: T

Re: a better way?

2002-09-26 Thread Jeff 'japhy' Pinyan
On Sep 26, Jerry Preston said: >Is there a better way? A Perl way? > > $j = 0; > while( ) { >chomp; >( $lots[ $j++ ] ) = $_; That's usually written as push @lots, $_; > } Well, you could do: chomp(@lines = ); but why do you need the file in an array? -- Jeff "japhy" Pi

Re:Matching and retriving files

2002-09-26 Thread Jeff 'japhy' Pinyan
On Sep 26, a n said: >I have a file that contains a list of file name prefixes and a directory >of expanded file names as shown here. > >I need to read the prefix_list.txt and for each prefix, list Only the >relevant files from the samples directory. > >For example: For the prefix : y022inv, the

RE: a better way?

2002-09-26 Thread Nikola Janceski
open(FILE, "yourfile") or die "$!"; chomp(my(@lots) = ); close FILE; > -Original Message- > From: Jerry Preston [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 11:30 AM > To: Beginners Perl > Subject: a better way? > > > Hi! > > Is there a better way? A Perl way? > >

Re: Extract alphanumeric characters not working . . .

2002-09-26 Thread Jeff 'japhy' Pinyan
On Sep 26, Tim Booher said: >#/usr/bin/perl -w ># tbb | 26 Sept 2002 ># removes non alphanumeric characters from file > >open(OUT, ">" . $ARGV[0] . "tmp"); > >while(<>) >{ > print $_; This prints the ORIGINAL data to your screen... > tr/a-zA-Z0-9//cd; > print OUT "$_\n"; This prints the CLE

a better way?

2002-09-26 Thread Jerry Preston
Hi! Is there a better way? A Perl way? $j = 0; while( ) { chomp; ( $lots[ $j++ ] ) = $_; } ? @lots = ; Thanks, Jerry

Re:Matching and retriving files

2002-09-26 Thread a n
I need to read in a file I have a file that contains a list of file name prefixes and a directory of expanded file names as shown here. I need to read the prefix_list.txt and for each prefix, list Only the relevant files from the samples directory. For example: For the prefix : y022inv, the

need some parsing ideas )

2002-09-26 Thread Yacketta, Ronald
All, I need to parse the following info and generate the total elapsed time for each function call per thread. <09/25/02 20:03:31.974 [21168]>|thread: 6: start getContract <09/25/02 20:03:32.296 [21168]>|thread: 6: end successful getContract <09/25/02 20:07:52.778 [21168]>|thread: 7: sta

Extract alphanumeric characters not working . . .

2002-09-26 Thread Tim Booher
I appreciate your help, but I can’t get a solution to work. Japhy, thanks for the insight into the tr command, but I think the problem is more fundamental than a simple text file. When I run the following script:   #/usr/bin/perl -w # tbb | 26 Sept 2002 # removes non alphanumeric char

RE: fork exitting sub

2002-09-26 Thread Kipp, James
ok, you should only need to exit the parent of the fork succeeds, in fact. looks like your second exit is exiting the child prematurely > -Original Message- > From: chad kellerman [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 10:48 AM > To: [EMAIL PROTECTED] > Subject: R

Re: Help with regular expressions within a split statement

2002-09-26 Thread Jeff 'japhy' Pinyan
On Sep 26, John W. Krahn said: >Shaun Bramley wrote: >> >> I have data that for some god foresaken reason is using two or three methods >> of delimitting names. Some are delimitted using '//' others with ';'. >> >> I have tried using @names = split( /(;)|(\/\/)/, $authors[$x]); however >> this

RE: fork exitting sub

2002-09-26 Thread chad kellerman
James, The script is too long. I fork because I tar thru ssh which uses memory. So that server I am on doesn't go done because of memory consumption I fork each tar so when the fork dies the memory is freed for the system.. I really think I have issues with my exit 's.. I am going to

RE: Key values for Win32::Lanman::NetServerEnum?

2002-09-26 Thread Deans, Glenn
I've tried SV_TYPE_WORKSTATION, but I keep getting servers in the output like the one below. MSDN describes it as 'All Workstations' but that doesn't seem to be the case. Although the 'Type' value is different. version_major=4 comment=IB - BDC Urbana (File Server) platform_id=500 type=135699 ve

RE: fork exitting sub

2002-09-26 Thread Kipp, James
> > James, > >I an tarring up different directories. Directories that may be in > home or maybe in another location. The directories in home are @users > and the directories in another location are @otherusrs. The thing is > the directories in the other location might not exist. > I

RE: checking parameters ...

2002-09-26 Thread Nikola Janceski
change && to || > -Original Message- > From: Admin-Stress [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 10:31 AM > To: Perl beginners > Subject: checking parameters ... > > > I wrote a simple script like this : > > #!/usr/bin/perl > > if (($ARGV[0] eq "") && ($ARGV[1

Re: Help with regular expressions within a split statement

2002-09-26 Thread John W. Krahn
Shaun Bramley wrote: > > I have data that for some god foresaken reason is using two or three methods > of delimitting names. Some are delimitted using '//' others with ';'. > > I have tried using @names = split( /(;)|(\/\/)/, $authors[$x]); however > this doesn't have the intended result. >

checking parameters ...

2002-09-26 Thread Admin-Stress
I wrote a simple script like this : #!/usr/bin/perl if (($ARGV[0] eq "") && ($ARGV[1] eq "") && ($ARGV[2] eg "")) { print "You must give me 3 parameters\n"; exit; } Then, I tested like with 1 .. OR 2 ... OR 3 parameters, it did not print the text "You must...". Why this happened? How to

RE: fork exitting sub

2002-09-26 Thread chad kellerman
James, I an tarring up different directories. Directories that may be in home or maybe in another location. The directories in home are @users and the directories in another location are @otherusrs. The thing is the directories in the other location might not exist. I read that before

  1   2   >