taint checking uploaded file with CGI.pm

2001-11-20 Thread WaspCatcher
hi, I've had a trawl around, and can't find the answer to this question. I am getting a file uploaded via a form, and am using CGI.pm. I am reg exping all inputs but I don't know whether / how to taint check an uploaded file. tia waspcatcher -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Cookies

2001-11-20 Thread jason
Need some help. I am looking at using cookies. For some of the things that I need to do I think that it will make my life easier. I also HAVE to use CGI qw(:cgi-lib) I am running Perl 5.6 and do not use the object oriented html function. I just want to use. print 'html'; etc.. Now

RE: getting output to stdout and browser not wanted

2001-11-20 Thread Jan-Willem Haaring
Hi On Tue, 20 Nov 2001, Randy Higginbotham wrote: Nevermind... OK $pgp_comand = $pgp_path -r \$pgp_public_key_user_id\ -at -o $output_file /dev/null creates the unwanted output, and $pgp_comand = $pgp_path -r \$pgp_public_key_user_id\ -at $output_file Does not. What's the problem?

stat function

2001-11-20 Thread Franck Collineau
Hi! I have the following code: #!/usr/bin/perl -w open(FIC,/home/collineau/Perl/Programmes/01_informatique/sauve/c0111_05.htm ) || die Impossible d'ouvrir $!\n;; @tab = stat (FIC); print scalar localtime($tab[10]); The date of c0111_05.htm is november 5th 2001. But the print is now !

RE:disable a frame

2001-11-20 Thread Jorge Goncalvez
Hi, How can I do to disable a frame which contains some widget in it in Perl TK? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CGI.pm problems continued

2001-11-20 Thread Scott R. Godin
In article 56313003.1006216242@[10.0.0.140], [EMAIL PROTECTED] (Birgit Kellner) wrote: I have tried the following code to read a query-string from a CGI request into a hash, taking into account (a) multiple select fields without knowing the field name, (b) getting rid of names without

Stat function

2001-11-20 Thread COLLINEAU Franck FTRD/DMI/TAM
Hi! I have the following code: #!/usr/bin/perl -w open(FIC,/home/collineau/Perl/Programmes/01_informatique/sauve/c0111_05.ht m) || die Impossible d'ouvrir $!\n;; @tab = stat (FIC); print scalar localtime($tab[10]); The date of c0111_05.htm is november 5th 2001. But the print is now ! What

Re: using perl-command line not working

2001-11-20 Thread Martin Pfeffer
you must escape this will work: perl -e print \@inc\; by martin Moulas, Lionel wrote: Hi. First post here, simple question. Trying, under the msdos command line (WinNT, cmd), perl -e ' print @INC' I get the message Can't find string terminator ' anywhere before EOF at -e line 1.

Sorting a list of links by the linked text

2001-11-20 Thread patrick hall
Hellew, I have an include file for my weblog that looks like this: bra href=http://www.ocf.berkeley.edu/;nutz0/a bra href=http://mundissa.com/;cronoacute;pios/a bra href=http://feralliving.blogspot.com;feral living/a bra href=http://underwatergirl.blogspot.com;so blue it#39;s black/a bra

HTML::Templ - Error in Doc

2001-11-20 Thread Martin Pfeffer
hi to all! I found a error in documentation of HTML::Template my $filter = sub { my $text_ref = shift; $$text_ref =~ s/!!!ZAP_(.*?)!!!/TMPL_$1/g; } replace } with }; HERE IS ERROR after } semicolon missing! # open zap.tmpl using the above filter my $template =

Re: CGI.pm problems continued

2001-11-20 Thread birgit kellner
--On Montag, 19. November 2001 21:09 -0500 Scott R. Godin [EMAIL PROTECTED] wrote: # !/usr/bin/perl -w use strict; use CGI 2.78 qw(:standard :cgi-lib -no_xhtml); # if this errors, remove the 2.78 # what version of CGI.pm does your server have? print $CGI::VERSION, CGI.pm installed\n; my $q

calling perlscript from html

2001-11-20 Thread Rahul Garg
problem goes like this- what i want is to call a perl script from html document or image...onload what tags ..code should i need to write in html Thanks, Rahul

RE: calling perlscript from html

2001-11-20 Thread John Edwards
It depends what you want the script to do. If it's returning html and you want that inserted in your page, use SSI (server side includes). If it's doing background work that doesn't return output to the browser, you can use an image tag with the source set to the script you want to run. The

Command Line arguments.

2001-11-20 Thread Nicolae Popovici
Hi guys, Can anyone tell me how can I take the command line arguments in a perl script . I forgot how to do it . Thanks for your support . Regards, Nick -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Command Line arguments.

2001-11-20 Thread RArul
The command-line arguments are stored in the built-in @ARGV array. Therefore, if you say something like : perl sample.pl argument1 argument2 argument3 then in your program you can access each of the command-line arguments as follows print $ARGV[0]; #prints argument1 print $ARGV[1]; #prints

Re: Regex: Why [^]* and not .*?

2001-11-20 Thread Etienne Marcotte
You should not extract html tags with this... check out http://www.perl.com/CPAN/authors/Tom_Christiansen/scripts/striphtml.gz The above can still be tricked out I think when having img alt=A B but for sure is way better. It's in fact 3 regexes. Also read

RE: Stat function

2001-11-20 Thread Bob Showalter
-Original Message- From: COLLINEAU Franck FTRD/DMI/TAM [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 3:31 AM To: [EMAIL PROTECTED] Subject: Stat function Hi! I have the following code: #!/usr/bin/perl -w

RE: Regex: Why [^]* and not .*?

2001-11-20 Thread Bob Showalter
-Original Message- From: Girish [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 3:42 AM To: [EMAIL PROTECTED] Subject: Regex: Why [^]* and not .*? Hi Again, I have a doubt, why do people use if($html =~ /([^]*)/) { } instead of simple to use

writting in a file

2001-11-20 Thread Franck Collineau
Hi! I have the follwing code: #!/usr/bin/perl -w open(FIC,/home/collineau/Perl/Programmes/01_informatique/sauve/c0111_05.htm) || die Impossible d'ouvrir $!\n; open (TEMP,/home/collineau/Perl/Programmes/01_informatique/sauve/temp.htm) || die Impossible d'ouvrir $!\n; while (FIC) {

Re: writting in a file

2001-11-20 Thread register
Should be print TEMP $_; On Tue, Nov 20, 2001 at 02:57:25PM +0100, Franck Collineau shaped the electrons to read: Hi! I have the follwing code: #!/usr/bin/perl -w open(FIC,/home/collineau/Perl/Programmes/01_informatique/sauve/c0111_05.htm) || die Impossible d'ouvrir $!\n; open

RE: writting in a file

2001-11-20 Thread COLLINEAU Franck FTRD/DMI/TAM
I'm sorry, I've found Thank you -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Envoyé : mardi 20 novembre 2001 15:18 À : COLLINEAU Franck FTRD/DMI Cc : [EMAIL PROTECTED] Objet : Re: writting in a file Should be print TEMP $_; On Tue, Nov 20, 2001 at 02:57:25PM

Re: writting in a file

2001-11-20 Thread Thomas S. Dixon
The filehandle should be outside the parentheses, like print TEMP $_; Also, you didn't close your files close FIC; close TEMP; Franck Collineau wrote: Hi! I have the follwing code: #!/usr/bin/perl -w

Profiler for Windows

2001-11-20 Thread Gross, Stephan
Does dprof work on Windows? Does any profiler? How do you know from CPAN if a module is windows compatible or not? ___ Stephan Gross Loral Skynet 908-470-2388 [EMAIL PROTECTED]

Re: Profiler for Windows

2001-11-20 Thread Martin Pfeffer
sometimes you can see this in the readme file martin Gross, Stephan wrote: Does dprof work on Windows? Does any profiler? How do you know from CPAN if a module is windows compatible or not? ___ Stephan Gross Loral Skynet

Little pb with sort ...

2001-11-20 Thread Franck FASANO
Here is a little code : -- my @trav= ( 1, 12, 5, 3); @trav=sort { $b cmp $a } @trav; foreach (@trav) { print $_ ; } -- After exec, we have : 5 3 12 1 But I expected : 12 5 3 1 How can I do ? I mean easily (without developping some code) ... Franck. -- To

Re: Little pb with sort ...

2001-11-20 Thread Etienne Marcotte
@trav=sort { $b = $a } @trav; = instead of cmp for numerical descending http://www.perldoc.com/perl5.6.1/pod/func/sort.html Etienne Franck FASANO wrote: Here is a little code : -- my @trav= ( 1, 12, 5, 3); @trav=sort { $b cmp $a } @trav; foreach (@trav) { print $_ ;

Re: Little pb with sort ...

2001-11-20 Thread Brett W. McCoy
On Tue, 20 Nov 2001, Franck FASANO wrote: Here is a little code : -- my @trav= ( 1, 12, 5, 3); @trav=sort { $b cmp $a } @trav; foreach (@trav) { print $_ ; } -- After exec, we have : 5 3 12 1 You're using the wrong operator. You want { $b = $a} for

Re: Off-Topic (200%) - Where are you from?

2001-11-20 Thread Jenda Krynicky
From: Etienne Marcotte [EMAIL PROTECTED] By reading the messages everyday I can guess most of us are from United States right? And since there are not a lot of messages in (my) morning time, probably means most are from the west coast (different timezone). Am I right?

Re: highlight words.

2001-11-20 Thread Jenda Krynicky
From: Houda Araj [EMAIL PROTECTED] The script #!/usr/bin/perl use strict; use diagnostics; use CGI qw/:standard/; use CGI::Carp 'fatalsToBrowser'; ... CODECan't use an undefined value as a symbol reference at highlight2.pl line 10. Try to add use FileHandle;

Re: open filehandle in lowercase produce warning, why?

2001-11-20 Thread Jenda Krynicky
From: Jeff 'japhy' Pinyan [EMAIL PROTECTED] On Nov 15, EternalLifeThereAfter said: Whilst playing with filehandles, I noted that if the unquoted-open-filehandles is in lower case it produces the following warnings = Unquoted string justaname may clash with future reserved

Error management

2001-11-20 Thread Teggy P Veerapen
Hello, I'm new to perl but not to programming, and I have been searching (without any success up to now) how perl handles errors. Does perl offer a system of error management ? Where can I find information (faq, URL or any other ...) about perl error management ? For example I'm using

RE: Sorting a list of links by the linked text

2001-11-20 Thread Wagner-David
Here is a start: Script starts on next line: #!perl -w printf %-20s - %-s\n, SortField, Url; foreach my $MyData (sort {$a-[2] cmp $b-[2]} map{ [$_,/=([^]+).+\([^]+)\\/a/i ] } DATA ) { printf %-20s - %-s\n, $MyData-[2], $MyData-[1]; } __DATA__ bra

flock problem on AIX 4.3.3

2001-11-20 Thread Rich Fernandez
Hello, A colleague is experiencing some problems using user_manage v1.53 by Lincoln Stein with Apache Stronghold 3 on AIX 4.3.3. Seems as though the entire password file is getting corrupted when there are a lot of people changing passwords. The file seems to be blanked out and/or with only a

Re: Error management

2001-11-20 Thread Peter Scott
At 02:37 PM 11/20/01 +0100, Teggy P Veerapen wrote: Hello, I'm new to perl but not to programming, and I have been searching (without any success up to now) how perl handles errors. Does perl offer a system of error management ? Kind of. You sound like you're looking for something like

Re: Error management

2001-11-20 Thread Brett W. McCoy
On Tue, 20 Nov 2001, Teggy P Veerapen wrote: I'm new to perl but not to programming, and I have been searching (without any success up to now) how perl handles errors. Does perl offer a system of error management ? Where can I find information (faq, URL or any other ...) about perl error

Shorthand

2001-11-20 Thread A. Rivera
Is there a quicker way to write this..just curious.. $count=SomeFunctionWitchReturnsaNumber; $count=$count+1; Thanks, Agustin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Shorthand

2001-11-20 Thread Adam Turoff
On Tue, Nov 20, 2001 at 11:04:15AM -0800, A. Rivera wrote: Is there a quicker way to write this..just curious.. $count=SomeFunctionWitchReturnsaNumber; $count=$count+1; $count = SomeFunctionWhichReturnsANumber() + 1; Z. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re[2]: Sorting a list of links by the linked text

2001-11-20 Thread Daniel Gardner
Tuesday, November 20, 2001, 7:11:34 PM, Wagner-David wrote: WD Here is a start: WD Script starts on next line: WD #!perl -w WD printf %-20s - %-s\n, SortField, Url; WD foreach my $MyData (sort {$a-[2] cmp $b-[2]} map{ [$_,/=([^]+).+\([^]+)\\/a/i ] } DATA ) { WDprintf %-20s - %-s\n,

Re: Shorthand

2001-11-20 Thread Brett W. McCoy
On Tue, 20 Nov 2001, A. Rivera wrote: Is there a quicker way to write this..just curious.. $count=SomeFunctionWitchReturnsaNumber; $count = func(); (I really hope you are not creating subs with names that long) $count=$count+1; $count++; -- Brett

Re: How to delete hash element

2001-11-20 Thread Brett W. McCoy
On Tue, 20 Nov 2001, Ahmed Moustafa Ibrahim Ahmed wrote: If I know the key and offset of the element, how can I delete that hash element, please? perldoc -f delete -- Brett http://www.chapelperilous.net/

Re: How to delete hash element

2001-11-20 Thread Daniel Gardner
Tuesday, November 20, 2001, 8:41:03 PM, Ahmed Moustafa Ibrahim Ahmed wrote: AMIA If I know the key and offset of the element, how can I delete that hash AMIA element, please? you can delete a hash element like: delete $hash{ the_key }; but i'm not sure what you mean by the offset of the

RE: How to delete hash element

2001-11-20 Thread Chris Spurgeon
Say you've got a hash called %myhash and it's got a key called foo. delete $myhash{foo}; will get rid of the foo key. Chris Spurgeon Senior Design Technologist [EMAIL PROTECTED] ELECTRONIC INK One South Broad Street 19th Floor Philadelphia, PA 19107

RE: How to delete hash element

2001-11-20 Thread Mike Rapuano
is it possible to delete a key along with the element?? -Original Message- From: Daniel Gardner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 3:50 PM To: Ahmed Moustafa Ibrahim Ahmed Cc: [EMAIL PROTECTED] Subject: Re: How to delete hash element Tuesday, November 20,

RE: How to delete hash element

2001-11-20 Thread RArul
That is what delete function does. It deletes both the key and the element it posits to. -- Rex -Original Message- From: Mike Rapuano [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 3:57 PM To: Daniel Gardner; Ahmed Moustafa Ibrahim Ahmed Cc: [EMAIL PROTECTED]

RE: How to delete hash element

2001-11-20 Thread Chris Spurgeon
Yeah, that gets rid of the key as well. Chris Spurgeon Senior Design Technologist [EMAIL PROTECTED] ELECTRONIC INK One South Broad Street 19th Floor Philadelphia, PA 19107 www.electronicink.com t 215.922.3800 x(233) f 215.922.3880 -Original Message- From: Mike

Perl on AIX

2001-11-20 Thread Maurice Newton
Hi, I'm new to Perl and I'm looking for a contact that uses Perl on AIX version 4.3+. Thanks, Maurice Newton MMS health-first.org made the following annotations on 11/20/01 16:20:22 -- This message is for the named

Re: how do tell a program to skip

2001-11-20 Thread Christopher Solomon
On Tue, 20 Nov 2001, shirley wrote: I've got a program running and extracting minimum values from the data base, but if there is no data available for the day on the data base, the value -999.9 is reflected. so how do I tell my program to skip the -999.9 and then select the minimum value

RE: flock problem on AIX 4.3.3

2001-11-20 Thread Bob Showalter
-Original Message- From: Rich Fernandez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 2:23 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: flock problem on AIX 4.3.3 Hello, A colleague is experiencing some problems using user_manage v1.53 by Lincoln

Re: How to delete hash element

2001-11-20 Thread Ahmed Moustafa Ibrahim Ahmed
The value of each key is an array. And, I want to delete an element of this array. I don't want to delete the whole key. Is it possible? - Original Message - From: Daniel Gardner To: Ahmed Moustafa Ibrahim Ahmed Cc: [EMAIL PROTECTED] Sent: Tuesday, November 20, 2001 12:50

RE: How to delete hash element

2001-11-20 Thread RArul
Still you should be able to handle it. Study the output: use strict; my(%hash) = ('name1'=['Joe','Doe'], 'name2'=['Ahmed', 'Basha']); while(my($key,$val) = each %hash){ print ($key == @$val\n); } delete(${$hash{'name2'}}[0]); while(my($key,$val) =

Re[2]: How to delete hash element

2001-11-20 Thread Daniel Gardner
Tuesday, November 20, 2001, 8:54:26 PM, Ahmed Moustafa Ibrahim Ahmed wrote: AMIA The value of each key is an array. And, I want to delete an AMIA element of this array. I don't want to delete the whole key. Is AMIA it possible? delete $hash{ key }-[0]; like brett said, perldoc -f delete AMIA

Re: How to delete hash element

2001-11-20 Thread Michael Fowler
On Tue, Nov 20, 2001 at 12:41:03PM -0800, Ahmed Moustafa Ibrahim Ahmed wrote: If I know the key and offset of the element, how can I delete that hash element, please? As far as I understand the followup clarification, what you really want to do is delete an element in an array, which just

Re: How to delete hash element

2001-11-20 Thread Ahmed Moustafa Ibrahim Ahmed
Michael, Thanks a lot. Ahmed - Original Message - From: Michael Fowler To: Ahmed Moustafa Ibrahim Ahmed Cc: [EMAIL PROTECTED] Sent: Tuesday, November 20, 2001 2:14 PM Subject: Re: How to delete hash element On Tue, Nov 20, 2001 at 12:41:03PM -0800, Ahmed Moustafa

symlinking a file to every homedir

2001-11-20 Thread Gabe Green
Hello, I'm trying to get a file to copy to all users home directories. When I run it as root below, it does not produce any error, but it does not copy /etc/sofficerc to .sofficerc in each directory in /home, as I expected. What am I missing here? Thanks, Gabe #!/usr/bin/perl -w # simple

Re: Little pb with sort ...

2001-11-20 Thread Leon
or you can use the reverse sort like this ... @trav= reverse sort { $a = $b } @trav; _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: writting in a file

2001-11-20 Thread Leon
- Original Message - From: Thomas S. Dixon [EMAIL PROTECTED] To: Franck Collineau [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, November 20, 2001 10:30 PM Subject: Re: writting in a file The filehandle should be outside the parentheses, like print TEMP $_; Therefore am I

what is this called $/

2001-11-20 Thread Leon
I know of the following :- $ = '|interpolation-seperator|'; $, = '|seperator|'; $\ = '\n endOfLine'; my @a = qw (hi how are you); print @a\n; My question is what is this called == $/ and where can I do some reading on $/ . Thanks _ Do

Re: what is this called $/

2001-11-20 Thread Peter Scott
At 01:54 PM 11/21/01 +0800, Leon wrote: I know of the following :- $ = '|interpolation-seperator|'; $, = '|seperator|'; $\ = '\n endOfLine'; my @a = qw (hi how are you); print @a\n; My question is what is this called == $/ $INPUT_RECORD_SEPARATOR $RS $/ The input

Re: what is this called $/

2001-11-20 Thread nafiseh saberi
hi. it is for The input record separator, newline by default. May be multicharacter. see it. http://burks.bton.ac.uk/burks/language/perl/perlref.htm#contents it is very good with all of special characters. Nafiseh Saberi Iran.

please help out guys

2001-11-20 Thread shirley
I've got a program running and extracting minimum values from the data base, but if there is no data available for the day on the data base, the value -999.9 is reflected. so how do I tell my program to skip the -999.9 when reading the data and then select the minimum value out of the data base.

Re: Regex: Why [^]* and not .*?

2001-11-20 Thread Randal L. Schwartz
Girish == Girish [EMAIL PROTECTED] writes: Girish Hi Again, Girish I have a doubt, why do people use Girish if($html =~ /([^]*)/) { Girish Girish } Girish instead of simple to use and understand Girish if($html =~ /(.*?)/) { Girish Girish } Girish To extract HTML

Re: registry Security permissions.

2001-11-20 Thread Jenda Krynicky
Is there any way to controll registry security permissions as we can do it from REGEDT32.exe in NT. This is very Urgent. Please respond if any. Thank you very much. With Regards Raju Install Win32::Perms (should be instalable via PPM) Jenda === [EMAIL PROTECTED] ==