Re: Write permissions and other rights

2002-04-23 Thread drieux
On Monday, April 22, 2002, at 10:46 , David Kirol wrote: Thanks Drieux I didn't want to take the time to write what you did, but I' m glad to see it on the list. David (aka sometimeAnotTooBrightNewbie) Caveat Emptor - What Do I Know? All I know is what I have figured out - and as I say, I

Re: Write permissions and other rights

2002-04-23 Thread Todd Wade
Drieux [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Besides I still feel squishy about the fact that I can run perl modules as 644 - which just seems unNatural to moi The executeable bit is only necessary so your shell will use the first line in the

RE: Write permissions and other rights

2002-04-23 Thread Tim Doty
[snip] As far as the topic in the subject, it is not a perl issue. When you want to write in a file or execute a program, the permissions you choose have nothing to do with the language you choose or if you are executing code in a CGI environment, so no, the topic is totally irrelevant to

Re: Write permissions and other rights

2002-04-23 Thread John Brooking
--- Todd Wade [EMAIL PROTECTED] wrote: ... anyone anything. My proof? perl.beginners and perl.beginners.cgi is a place where its pc to ask frequently asked questions. Over and over. Is there a FAQ document for this list? I just re-read my list welcome message and didn't see any reference

Improving the Quality of Our Beginners was Re: Write permissions and other rights

2002-04-23 Thread drieux
On Tuesday, April 23, 2002, at 05:44 , Todd Wade wrote: Drieux [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Besides I still feel squishy about the fact that I can run perl modules as 644 - which just seems unNatural to moi [..] oh I 'get' the notions

unexpected results with grep

2002-04-23 Thread Nazary, David
Hi, I am trying to use grep in a simple perl script to find all the lines in a list (@labels) that contain certain names in a list (@names). The problem is that grep finds all the lines in @labels for every name in the @names. here is the script: open(NAMES, names); open(LABELS, labels);

RE: unexpected results with grep

2002-04-23 Thread Nikola Janceski
inside grep $_ is a special var assigned to each value of the array. use another var for the //; -Original Message- From: Nazary, David [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 12:29 PM To: '[EMAIL PROTECTED]' Subject: unexpected results with grep Hi, I am

RE: unexpected results with grep

2002-04-23 Thread Nazary, David
instead of $_ I used $name but nothing was found by grep. What do you mean by another variable? -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 9:40 AM To: 'Nazary, David'; '[EMAIL PROTECTED]' Subject: RE: unexpected results with grep

RE: unexpected results with grep

2002-04-23 Thread Bob Showalter
(don't top-post; see responses in context below...) -Original Message- From: Nazary, David [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 1:12 PM To: 'Nikola Janceski'; '[EMAIL PROTECTED]' Subject: RE: unexpected results with grep instead of $_ I used $name but

RE: unexpected results with grep

2002-04-23 Thread Bob Showalter
-Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 1:33 PM To: 'Nazary, David'; '[EMAIL PROTECTED]' Subject: RE: unexpected results with grep ... If you want to find the labels containing the current name, you need something like:

RE: unexpected results with grep

2002-04-23 Thread Nazary, David
I will not have any regep in the $names. It contains the name of users that have created label type in ClearCase. Thanks for your help David -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 10:39 AM To: 'Nazary, David'; '[EMAIL PROTECTED]'

Why Having Version Strings in CGI's is good

2002-04-23 Thread drieux
Uncle Drieux Learns an important lesson. Never let artists download and install interesting perl CGI's to the site CGI without making sure that they 'get it' about security. I mean some ancient piece of cgi form got hacked today and was spamming from our site - I mean they must have gotten at

RE: exiting correctly

2002-04-23 Thread Boex,Matthew W.
dave, below is a snipet of the code. the most relavant part. when i enter some bad data in or mysql has problems, it should go to error_handler() at the bottom of my script. well it does, then it returns unless i put an exit at the end of error_handler.

http headers

2002-04-23 Thread Conan Chai
hi, are there any perl modules that splits the http request headers into name/value pairs? Conan It Will Come To Us !!! [EMAIL PROTECTED]

RE: http headers

2002-04-23 Thread Timothy Johnson
I don't use Perl for web stuff myself, but just from hearing other people talk, you might want to look into the LWP modules and CGI. -Original Message- From: Conan Chai To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 4/23/02 9:07 PM Subject: http headers hi, are there any perl modules

print hash

2002-04-23 Thread Stefan.Haberer
Hello everybody, my code below should read in data from a file info.txt into a hash, the sub print_hash should print all hash-elements. actually it only prints the last key-value-pair. Does anybody see the mistake?Thank you for your help!!! Greetings Habi use strict; my

RE: Windows IDE for Perl ?

2002-04-23 Thread Jackson, Harry
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Hi, you should try this tiny (1,6 MB with manual and source code) Perl IDE http://open-perl-ide.sourceforge.net/ (mirror at http://www.lost-sunglasses.de/). It's not as comfortable as commercial app's, but It's

sort regex trouble!

2002-04-23 Thread maasha
hi im trying to sort out this sort routine: the sub by_number_of_citations works but if i try to make a sort alphabetically, my regex fails? how should it be done? martin # sting to match: trtd1212/tdtdCited Work/tdtd12/tdtd1232/tdtd1999/td/tr # sort routine # sub

Assigning values from files into an aray

2002-04-23 Thread Ho, Tony
Hi guys I was wondering if you could help me. I have the following row of data in one file: 405^100^200^A^B C D E I have the following fragment of code that reads the data row: while (FILE_OPENED) { $number_of_elements= 0; chop; ($record, $customer,

Re: Assigning values from files into an aray

2002-04-23 Thread Sudarsan Raghavan
405^100^200^A^B C D E while (FILE_OPENED) { $number_of_elements= 0; chop; ($record, $customer, $location, $plan, @items) = split(/\^/, $_); $number_of_elements= $#items + 1; print number_of_elements: $number_of_elements\n; } At the

Re: print hash

2002-04-23 Thread Sudarsan Raghavan
[EMAIL PROTECTED] wrote: Hello everybody, my code below should read in data from a file info.txt into a hash, the sub print_hash should print all hash-elements. actually it only prints the last key-value-pair. Does anybody see the mistake?Thank you for your help!!! The scripts runs

Why could Perl help the PDA enthusiast?

2002-04-23 Thread Yasen Petrov
Hello, I've got two questions: 1. How could Perl help the PDA enthusiast? 2. When I turn on my PC, I'm promped to choose a OS: Win98 or WinXP. XP doesn't work. So how to remove this prompt and run always Win98? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE: Standalone exe's

2002-04-23 Thread Jenda Krynicky
From: Kingsbury, Michael [EMAIL PROTECTED] The question was never asked, but what type of performance difference is seen with a perl2exe type compiler? I develope scripts for Clearcase (a commercial CVS-type source revision control system) that are run when a file is checked in/out etc, and

RE: Windows IDE for Perl ?

2002-04-23 Thread ryanb
Another one to check out is OptiPerl by Xarka Software. It's not free, but it is very inexpensive and does the things you mentioned. I've been using it for about 6 months, and I can say the support for OptiPerl is very good. If you have a question about its use, you just send them an email and

how to install perl in HP-UX

2002-04-23 Thread kitti
How to install Perl in HP-UX. I have download file perl-5.6.1-sd-10.20.depot.gz for new system admin please

variable not set as expected

2002-04-23 Thread richard noel fell
Below is a subroutine that is part of a perl/Tk script. The variable $test_path is initialized earlier to the empty string and the variable $tests_directory is likewise initialized to the correct directory. The array @test_files contains entries such as (test1, test2, ..) and is correctly set by

RE: Assigning values from files into an aray

2002-04-23 Thread Timothy Johnson
Assuming all of your data follows the same format, you could always do something like this: $_ =~ /\^([^\^]+)$/; #a ^ followed by one or more non-^ chars @items = split /\s/,$1; Disclaimer: I might have the character class part wrong. I can't test this yet. or option 2: ($record,

Re: case

2002-04-23 Thread Chas Owens
On Mon, 2002-04-22 at 06:52, walter valenti wrote: Hi, there is in Perl a statement case like in C or in Pascal ??? Walter Damian Conway has written a module to implement a switch for Perl as a proof of concept for Perl 6. You can install it by saying perl -MCPAN -e install Switch

RE: variable not set as expected

2002-04-23 Thread Timothy Johnson
Have you tried doing a print @test_files;? It looks to me like there wouldn't be any files in the array because readdir(TESTS_DIR) would return only the file names, not the full paths, so grep {-f $tests_directory/$_} readdir TESTS_DIR; might not be returning anything. But then again I'm not

Re: variable not set as expected

2002-04-23 Thread richard noel fell
Timothy - Yes, I have done a print @test_files and it is as expected. Dick Timothy Johnson wrote: Have you tried doing a print @test_files;? It looks to me like there wouldn't be any files in the array because readdir(TESTS_DIR) would return only the file names, not the full

RE: variable not set as expected

2002-04-23 Thread Nikola Janceski
how are using this subroutine in your code? Can you give us the line where you use this sub, Tk is bit picky at times when you try funky things. -Original Message- From: richard noel fell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 10:45 AM To: [EMAIL PROTECTED]

Installing perl on partitioned drive

2002-04-23 Thread Motherofperls
Need instruction not sure where to get it. I have downloaded apache and perl. I just partitioned my hard drive with partition magic, and now have 3 os systems on one computer. Win98, Win95, and Linux. And want to install Win2000 soon. What I want to know is do I have to put Active perl

Re: case

2002-04-23 Thread Chas Owens
On Tue, 2002-04-23 at 10:30, Chas Owens wrote: On Mon, 2002-04-22 at 06:52, walter valenti wrote: Hi, there is in Perl a statement case like in C or in Pascal ??? Walter Damian Conway has written a module to implement a switch for Perl as a proof of concept for Perl 6. You

RE: Win32:OLE and Excel, problems writing from the web

2002-04-23 Thread Hooten, Michael
This works just fine for me. If you have use strict; in effect, you must quote the following property names, ie: 'FitToPagesWide' = 1, - with ($Sheet-PageSetup, FitToPagesWide = 1, PrintGridlines = 0, CenterHeader= Empty, RightHeader = Test

Re: variable not set as expected

2002-04-23 Thread richard noel fell
Nikola - Here is the code. I hope you can make some sense out of it. Thanks for your efforts and help. Dick #!/usr/local/ActivePerl-5.6/bin/perl5.6.1 -w use strict; use File::Basename; use Tk; use Tk::Dialog; use Cwd; our $MW =MainWindow-new(); my $test_path=; create_menu_bar();

Re: Win32::TieRegistry

2002-04-23 Thread Jorge Goncalvez
Hi, i have this snippet (perl module) which uses Win32::registry(obsolete) but it didn't worked very well,I wonder how to get his job with Win32::tieRegistry. package NIC98; require Win32::Registry; sub GetNICName() { my $Register = System\\CurrentControlSet\\Services\\Class\\Net\\;

RE: variable not set as expected

2002-04-23 Thread Nikola Janceski
I can't make sense of the code. Sorry, but this is what I see looking back.. [map {[ 'command', $_,-command=sub{$test_path=$tests_directory./.$_; print $test_path\n;}]}@test_files]; This line... you will understand if broken up by some white space [ map { [ 'command',

RE: Why could Perl help the PDA enthusiast?

2002-04-23 Thread Timothy Johnson
1. I dunno. 2. I suppose you could try either editing your boot.ini or replacing ntldr and boot.ini with the correct versions of io.sys, msdos.sys, and autoexec.bat and doing an MBR fix from fdisk or something crazy like that, but either one is REALLY risky and may result in a non-bootable

Re: sort regex trouble!

2002-04-23 Thread bob ackerman
On Monday, April 22, 2002, at 06:01 AM, [EMAIL PROTECTED] wrote: hi im trying to sort out this sort routine: the sub by_number_of_citations works but if i try to make a sort alphabetically, my regex fails? how should it be done? martin # sting to match: trtd1212/tdtdCited

RE: Why could Perl help the PDA enthusiast?

2002-04-23 Thread Jonathan E. Paton
2. When I turn on my PC, I'm promped to choose a OS: Win98 or WinXP. XP doesn't work. So how to remove this prompt and run always Win98? I suppose you could try either editing your boot.ini or replacing ntldr and boot.ini with the correct versions of io.sys, msdos.sys, and autoexec.bat

RE: Assigning values from files into an aray

2002-04-23 Thread Hooten, Michael
Change ($record, $customer, $location, $plan, @items) = split(/\^/, $_); ^^ To ($record, $customer, $location, $plan, @items) = split(/[\^\s]+/, $_); Split buy default works on

Line number of whence called

2002-04-23 Thread Nikola Janceski
Is there someway to get the line number of whence a subroutine was called? i.e. #!perl use subs qw(die); sub die { ## do some special stuff here. CORE::die @_; } die not here if 0; die I died here; __END__ I want to see the line where die was called not line 6;

Re: Line number of whence called

2002-04-23 Thread Jonathan E. Paton
Is there someway to get the line number of whence a subroutine was called? Yes, but 9/10 ten people use Carp.pm, the other 1 respondant was an assembly language programmer. perldoc Carp Carp is implemented using 'caller', which you can find documentation about at: perldoc -f caller If you

RE: Line number of whence called

2002-04-23 Thread Nikola Janceski
I am atheist so I don't believe in the Religion Module. 8^P PS you're right... should have used Carp. -Original Message- From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 1:24 PM To: [EMAIL PROTECTED] Subject: Re: Line number of whence called Is

RE: unexpected results with grep

2002-04-23 Thread Nikola Janceski
np.. I forgot to CC the list those past few times. -Original Message- From: Nazary, David [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 1:34 PM To: 'Nikola Janceski' Subject: RE: unexpected results with grep It worked just fine. Thanks very much for you help Nikola.

RE: Line number of whence called

2002-04-23 Thread Timothy Johnson
After die-ing, I think the Body::Decompose module still works fine without any of the Religion subclasses. If you want to prevent this, you'll have to put 'use Formaldehyde;' at the end of your code. -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

Parsing a line

2002-04-23 Thread Busse, Rich
I'm currently processing lines from an input file this way: $_ = P=IcwRcsm D=D:SL=20 ST=d:\icw\rcsm\StartSv.bat U=http://uslv...; @Token = split ; foreach (@Token) { $Proc = $' if (/P=/i) ; $Start = $' if (/ST=/i) ;

RE: Parsing a line

2002-04-23 Thread Timothy Johnson
Well, if you've already got a variable with the program name that you're using, why not something like this: $Start .= Parm1 Parm2; (assuming that you are not using the variable $Start for anything else) Otherwise you can do: $newvar = $Start. Parm1 Parm2; -Original Message- From:

Re: variable not set as expected

2002-04-23 Thread richard noel fell
Nikola - An interesting point. Perhaps you are onto something, but an eval where you suggested does not work. However, you comments lead me to other ideas to try. Thanks, Dick Nikola Janceski wrote: I can't make sense of the code. Sorry, but this is what I see looking back.. [map

RegEx question

2002-04-23 Thread Ron
I have been using the below subroutine for Parsing my data from forms. The question I have; can someone explain this line to me, $value =~ tr/+/ /; The tr has me a bit confused. Thank you for any input, Ron sub Parse_Form { if

RE: RegEx question

2002-04-23 Thread Stout, Joel R
Just translates your + to . my ($key); $key = one two three+four; $key =~ tr/+/ /; print $key\n; one two three four -Original Message- From: Ron [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 11:18 AM To: [EMAIL PROTECTED] Subject: RegEx question I have been using the

Re: RegEx question

2002-04-23 Thread Jenda Krynicky
From: Ron [EMAIL PROTECTED] I have been using the below subroutine for Parsing my data from forms. Please don't! use CGI; or use CGI::Lite; even use CGI::Deurl; but don't try it yourself. The question I have; can someone explain this line to me, $value =~

RE: RegEx question

2002-04-23 Thread Hanson, Robert
tr/// translates from one character to another. So fo each + it finds it translates it to a space. The purpose of tr/// is to be able to give it one or more characters in the left part of the match and one or more characters on the right side, and it will translate each char on the left to the

Re: RegEx question

2002-04-23 Thread Michael M. L. Broggy
On Tue, 23 Apr 2002, Ron wrote: I have been using the below subroutine for Parsing my data from forms. The question I have; can someone explain this line to me, $value =~ tr/+/ /; The tr has me a bit confused. tr is transliterate, so it translates the first argument (+, in this case) to

Re: RegEx question

2002-04-23 Thread Ron
Thank you. I feel like a dummy. Duh, tr = translate, I learned that in my beginning PERL classes. Thank you folks for jogging my feeble mind. Ron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: how to install perl in HP-UX

2002-04-23 Thread Craig Sharp
Kitti, First you must unzip the file: gzip -d perl-5.6.1-sd-10.20.depot.gz Then you must install the file as root by running swinstall and pointing to the depot file. Craig A. Sharp Unix Systems Administrator DNS Administrator Roush Industries Office: 734-466-6286 Cell: 734-231-6769 Fax:

Re: RegEx question

2002-04-23 Thread Jeff 'japhy' Pinyan
On Apr 23, Ron said: Thank you. I feel like a dummy. Duh, tr = translate, I learned that in my beginning PERL classes. Thank you folks for jogging my feeble mind. Actually, tr/// stands for transliterate, which means something different. Translation is a context-related conversion of one

[OT] DBI-ODBC WIN2K

2002-04-23 Thread Eduardo Cancino
I have this problem now, maybe is not about perl but here I go: I connected an Access Datasource to a cgi, (made in Perl ;), but while in the command line runs perfectly, as a CGI, on my host, it outputs: Software error: No pude conectarme : (DBD: db_login/SQLConnect err=-1) I know that maybe

Re: unexpected results with grep

2002-04-23 Thread drieux
On Tuesday, April 23, 2002, at 09:28 , Nazary, David wrote: [..] open(NAMES, names); open(LABELS, labels); @labels = LABELS; @names = NAMES; foreach $name (@names){ open(NEW, $name);#create a file with the name from @names @labeled_names = grep (/$_/, @labels);

RE: RegEx question

2002-04-23 Thread Timothy Johnson
Actually, transliteration is the substitution of one character or set of characters for another. Translation in the context below is the conversion of words from one language to words of another. It is sometimes used as a synonym for interpretation, but interpretation is the only definition

Dumb question

2002-04-23 Thread Matt Fuerst
I have a variable that needs to store a string such as $var = te$t; This doesn't work since perl thinks the $ means I want some variable substitution in there. I tried doing: $var = te\$t; but no luck there either. What's the secret? Thanks! Matt -=-=-=-=-=-=-=-=-=-=-=-=-=-= Matt Fuerst

RE: Dumb question

2002-04-23 Thread Timothy Johnson
Hmm. It should. If you do a print $var, it doesn't print correctly? Or are you trying to do something else that fails? What is the error message? -Original Message- From: Matt Fuerst [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 1:06 PM To: '[EMAIL PROTECTED]' Subject:

evaluating multiple conditions

2002-04-23 Thread Shaun Fryer
Is there a simple way to evaluate multiple conditions in an if or unless statement? For example take the following very simple example. if (($something eq 'string0') || ($something eq 'string1') || ($something =~ /string2/)) { do_something; } else { do_somthing_else; } Being a bit of a

RE: evaluating multiple conditions

2002-04-23 Thread Timothy Johnson
How about this? if($something =~ /^(string0|string1|string2)$/){ -Original Message- From: Shaun Fryer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 1:15 PM To: Perl Beginners Subject: evaluating multiple conditions Is there a simple way to evaluate multiple conditions in

Re: Dumb question

2002-04-23 Thread Johannes Franken
* Matt Fuerst [EMAIL PROTECTED] [2002-04-23 22:06 +0200]: $var = te$t; I tried doing: $var = te\$t; but no luck there either. te\$t should work. To avoid interpolation, you can also use single quotes 'te$t' or q/te$t/ . man perlop for more information about quote operators. -- Johannes

Re: evaluating multiple conditions

2002-04-23 Thread Johannes Franken
* Shaun Fryer [EMAIL PROTECTED] [2002-04-23 22:15 +0200]: Is there a simple way to evaluate multiple conditions in an if or unless statement? perldoc -q 'How do I create a switch or case statement?' -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED]

Re: evaluating multiple conditions

2002-04-23 Thread Kevin Old
Shaun, You would want to use a switch (sometimes called case) statementtry something like this MYSWITCH: for ($something) { /string0/ do { do_something; last MYSWITCH; }; /string1/ do { do_something;

RV: [OT] DBI-ODBC WIN2K

2002-04-23 Thread Eduardo Cancino
But how do I know who the correct user is??? I have tried todos (all) the admin but it doesnot work! -Mensaje original- De: David Kirol [mailto:[EMAIL PROTECTED]] Enviado el: Martes, 23 de Abril de 2002 02:45 p.m. Para: Eduardo Cancino Asunto: RE: [OT] DBI-ODBC WIN2K Eduardo,

RE: [OT] DBI-ODBC WIN2K

2002-04-23 Thread Eduardo Cancino
here is the source of my cgi use DBI; use CGI qw(:standard); use CGI::Carp ('fatalsToBrowser'); my $dbh = DBI-connect ( dbi:ODBC:database, admin, all ) or die No pude conectarme : $DBI::errstr\n; my $sth = $dbh-prepare( SELECT titulo, id, fecha FROM table1 ORDER BY id

RE: evaluating multiple conditions

2002-04-23 Thread Bob Showalter
-Original Message- From: Shaun Fryer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 4:15 PM To: Perl Beginners Subject: evaluating multiple conditions Is there a simple way to evaluate multiple conditions in an if or unless statement? For example take the following

Testing for null strings and/or input...

2002-04-23 Thread Ron Powell
Basically, I have 30 records in one file and another file with 25 records... these files are opened for reading, a record from the first file is paired with a record from the second file and output a 3rd file. Obviously, the first 25 records are fine, but the last five records are being paired

RE: evaluating multiple conditions

2002-04-23 Thread Timothy Johnson
Oops. I misread the last operator. I should have written if($something =~ /^(string0|string1)$/ || $something =~ /string2/){ I don't know how efficient it would be, I haven't benchmarked it. -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23,

RE: evaluating multiple conditions

2002-04-23 Thread Bob Showalter
-Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 5:11 PM To: 'Bob Showalter'; 'Shaun Fryer'; Perl Beginners Subject: RE: evaluating multiple conditions Oops. I misread the last operator. I should have written if($something

Re: Parsing a line

2002-04-23 Thread John W. Krahn
Rich Busse wrote: I'm currently processing lines from an input file this way: $_ = P=IcwRcsm D=D:SL=20 ST=d:\icw\rcsm\StartSv.bat U=http://uslv...; @Token = split ; foreach (@Token) { $Proc = $' if (/P=/i) ; $Start =

RE: evaluating multiple conditions

2002-04-23 Thread Timothy Johnson
Well, we've been through this before, but if you're really worried about having a \n at the end of your string, you can substitute a \Z for the $ in the regex. It all depends on where the input comes from, and besides, noone has been able to give an example of how this can come back to bite you

RE: evaluating multiple conditions

2002-04-23 Thread Jonathan E. Paton
Is there a better way to simplify the syntax when testing for multiple conditions? Your original code is the proper way to do it. All the other solutions proffered are inferior, IMO. Use 'or' and 'and' to remove clutter, they have different precedance and are often useful in this

Re: Testing for null strings and/or input...

2002-04-23 Thread Chas Owens
On Tue, 2002-04-23 at 17:00, Ron Powell wrote: Basically, I have 30 records in one file and another file with 25 records... these files are opened for reading, a record from the first file is paired with a record from the second file and output a 3rd file. Obviously, the first 25 records

Re: evaluating multiple conditions

2002-04-23 Thread bob ackerman
On Tuesday, April 23, 2002, at 03:05 PM, Jonathan E. Paton wrote: Is there a better way to simplify the syntax when testing for multiple conditions? Your original code is the proper way to do it. All the other solutions proffered are inferior, IMO. Use 'or' and 'and' to remove clutter,

RE: evaluating multiple conditions

2002-04-23 Thread Shaun Fryer
This code doesn't need to be fixed. For style, I would remove the inner parens (unnecessary) and change the function calls to do_something() instead of the (old-style) do_something. Is changing the function calls just a matter of style, or is there a more important reason to do it?

commenting perl

2002-04-23 Thread Shaun Fryer
Is there a simple way to comment multiple lines in Perl in a like manner to the /* or !-- comments in JavaScript and HTML respectively. Or is it absolutely necessary to put a # at the beginning of each individual commented line? === Shaun Fryer === London

RE: commenting perl

2002-04-23 Thread Mike Rapuano
=cut multi line comment =cut __DATA__ Mike -Original Message- From: Shaun Fryer Sent: Tue 4/23/2002 6:37 PM To: Perl Beginners Cc: Subject: commenting perl Is there a simple way to

Re: RegEx question

2002-04-23 Thread Shaun Fryer
I have been using the below subroutine for Parsing my data from forms. Up until recently I was using cgi-lib.pl's ReadParse routine to do the same thing. Since the one you are using is quite similar you can easily port existing scripts using the following in place of that subroutine. use CGI;

RE: evaluating multiple conditions

2002-04-23 Thread Shaun Fryer
It's my understanding that the difference between some_func; and some_func(); is that the '' invocation passes the original contents of @_ into some_func, whereas the '()' invocation has an empty @_ in some_func. In the first instance, some_func has access to the arguments of the

RE: evaluating multiple conditions

2002-04-23 Thread Tiller, Jason
Hi, Shaun, :) From my reading of the 'perlsub' manpage, the some_func( arg1, arg2, ..., argn ); syntax calls some_func with the specific argument list but does *not* check some_func's prototype (if it has one). So, it's a way of getting around overly-fascist functions if you need to. I

Unable to install perl 5.6.1 under AIX 4.1.5

2002-04-23 Thread John Heiden
Say, can anyone help me get perl 5.6.1 installed under AIX 4.1.5? I have tried and tried, and here's what I keep getting during make, I think... gcc -o miniperl -L/usr/local/lib `echo gv.o toke.o perly.o op.o regcomp.o dump.o util.o mg.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o

Activestate, IIS, and chdir

2002-04-23 Thread John Bodoni
This is making my head hurt. In an effort to share my pain, I humbly ask the list for help. (part of) My code looks like this: chdir 'j:/wsinfo'; system dir /p; When I execute it from command line, I get a directory of j:\wsinfo - exactly what I wanted. When I execute it from a web browser,

http headers

2002-04-23 Thread Conan Chai
hi, are there any perl modules that splits the http request headers into name/value pairs? Conan It Will Come To Us !!! [EMAIL PROTECTED]

RE: http headers

2002-04-23 Thread Timothy Johnson
I don't use Perl for web stuff myself, but just from hearing other people talk, you might want to look into the LWP modules and CGI. -Original Message- From: Conan Chai To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 4/23/02 9:07 PM Subject: http headers hi, are there any perl modules

Re: evaluating multiple conditions

2002-04-23 Thread Jonathan E. Paton
The suggestion of: if($something =~ /^(string0|string1|string2)$/) is not equivalent to your original condition. It's also likely to be inefficient. I get 1 min 15.983sec for normal three condition if, and 52.305sse for a regex approach. My test code is: my $type =

install perl on window xp

2002-04-23 Thread yi zhang
Hi, Is there anybody who installs ActivePerl5.6.1 successfully on window XP home edition? I used to use MacPerl, but now I had a new PC. I tried several times following the instruction from Activestate company, not working. I also try to install standard perl distribution, but I don't know