perl cgi security

2002-10-27 Thread Admin-Stress
Hi, I am new to perl cgi. I would like to ask (maybe a silly question) : Is it possible to VIEW the source code of a perl cgi from a website? For example, I wrote a perl cgi like this http://www.myweb.com/cgi-bin/addcustomer.pl The purpose of that script is to add new customer into my MySQL

Re: Easy one [getting OCT from localtime]

2002-10-27 Thread K Pfeiffer
John W. Krahn writes: Jeff 'Japhy' Pinyan wrote: [...] my $month = (split ' ', uc localtime)[1]; localtime(), in scalar context, returns a string like Fri Oct 25 10:30:23 2002 I'm uppercasing it, splitting it on whitespace, and getting the 2nd element (OCT). And, of course,

Re: read from a file

2002-10-27 Thread K Pfeiffer
Vo, Synh writes: I changed the code and still got errors. [...] print NEW grant select , update, delete, insert on $item user; ; [...] syntax error at grant.pl line 13, near grant select , update, delete, insert on $item String found where operator expected at grant.pl line

RE: Testing for hidden or system files

2002-10-27 Thread ss004b3324
Hi, Does anyone know how to test for a hidden or system file under Windows 95/2000? This works: use strict; use Win32::File; my $attr; my $file = 'C:\Perl\Scripts\test.txt'; Win32::File::GetAttributes($file,$attr ); if ($attr HIDDEN || $attr SYSTEM) { print $file attributes are:

Re: Easy one [getting OCT from localtime]

2002-10-27 Thread John W. Krahn
K Pfeiffer wrote: This lost me for a moment. I figured it out by trying... #!/usr/bin/perl use warnings; use strict; # test get uc month from localtime my $month = qw(JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC)[(localtime)[4]]; print localtime,\n; my $x = localtime[4]; print

RE: stripping web pages

2002-10-27 Thread Steven_Massey
Beau lots to understand in there .. I'll certainly be looking at the LWP::UserAgent stuff thanks - much appreciated Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Any Perl versions of ...

2002-10-27 Thread Felix Geerinckx
on za, 26 okt 2002 09:16:33 GMT, Paul Company wrote: I'm looking for the following programs written in portable Perl. What I mean by portable is the script doesn't contain system() or backticks (``). vi written in perl cvs written in perl gzip written in perl Stop looking - you won't

catching error string from MySQL using DBI

2002-10-27 Thread aman cgiperl
I use DBI in my CGI-PERL coding. How can I get the exact output string (error/success) for display, that I would receive from the MySQL on executing the same query on the command line mysql Thanks Aman -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Easy one [getting OCT from localtime]

2002-10-27 Thread Jeff 'japhy' Pinyan
On Oct 27, John W. Krahn said: So what did localtime[4] (without parens) do? my $x = localtime[4]; Is the same as: my $x = localtime; Which assigns the scalar value of localtime to $x. The [4] part is ignored. No, it is not ignored. localtime() takes an argument -- a number of seconds.

Need Help with MySQL disconnect command

2002-10-27 Thread SafelistSmart
I am trying to fix a an error in a set of scripts I purchased, but cannot seem to get support for. I am getting the following error in my server log, which coincides with a configuration error seen by the user in their browser. What is odd, is that even though we are being told in the log and

Re: Need Help with MySQL disconnect command

2002-10-27 Thread Todd W
Safelistsmart wrote: I am trying to fix a an error in a set of scripts I purchased, but cannot seem to get support for. I am getting the following error in my server log, which coincides with a configuration error seen by the user in their browser. What is odd, is that even though we are being

Current working directory and @INC

2002-10-27 Thread George Szynal
Please show a good way to append the current working directory to INC. Will this work? (I'm not able to access my perl server at this time). Is there a way to do this without using Cwd? --- use Cwd; $dir= getcwd(); INC = INC . $dir; ---

Re: Current working directory and @INC

2002-10-27 Thread Jeff 'japhy' Pinyan
On Oct 27, George Szynal said: Please show a good way to append the current working directory to @INC. To append a value to any old array, you use push() @list = qw( a b c ); push @list, 'd'; -- Jeff japhy Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother

Re: Current working directory and @INC

2002-10-27 Thread Paul Johnson
On Sun, Oct 27, 2002 at 02:35:55PM -0500, Jeff 'japhy' Pinyan wrote: On Oct 27, George Szynal said: Please show a good way to append the current working directory to @INC. To append a value to any old array, you use push() @list = qw( a b c ); push @list, 'd'; And changing @INC is

Re: Easy one [getting OCT from localtime]

2002-10-27 Thread John W. Krahn
Jeff 'Japhy' Pinyan wrote: On Oct 27, John W. Krahn said: So what did localtime[4] (without parens) do? my $x = localtime[4]; Is the same as: my $x = localtime; Which assigns the scalar value of localtime to $x. The [4] part is ignored. No, it is not ignored. localtime()

Re: Current working directory and @INC

2002-10-27 Thread Jeff 'japhy' Pinyan
On Oct 27, Paul Johnson said: On Sun, Oct 27, 2002 at 02:35:55PM -0500, Jeff 'japhy' Pinyan wrote: On Oct 27, George Szynal said: Please show a good way to append the current working directory to @INC. To append a value to any old array, you use push() @list = qw( a b c ); push

Re: Current working directory and @INC

2002-10-27 Thread George Szynal
Like so? use Cwd; $dir = getcwd(); $targetDir = $dir . //Contents//Resource//AddSystem//; push INC, $targetDir;

Re: Current working directory and @INC

2002-10-27 Thread George Szynal
Which I should probably have mentioned that all of this is to avoid editing the LIB entry for Makefile.PL, and let @INC do the work for me. - Original Message - From: Jeff 'japhy' Pinyan [EMAIL PROTECTED] To: Paul Johnson [EMAIL PROTECTED] Cc: George Szynal [EMAIL PROTECTED]; [EMAIL

Trouble with WinPerl @INC

2002-10-27 Thread George Szynal
1. There is a dot at the end of the default INC path string 2. There is no comma or any seperator between the paths in that string. I went to do the following append to INC, when I noticed these troubles in the original INC string. Is this only on WinPerl?

Function...

2002-10-27 Thread Piedro
Hello, I was wondering whether there is an integrated function in Perl, that makes strings' combinations,for example: I have 4 digits, each of which can take the discrete values of 0 and 1. I want to have these combinations as output. Thanx. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Trouble with WinPerl @INC

2002-10-27 Thread Steve Grazzini
George Szynal [EMAIL PROTECTED] wrote: 1. There is a dot at the end of the default @INC path string 2. There is no comma or any seperator between the paths in that string. It's not a string; it's an array. Try this. foreach (@INC) { print $_\n; } You'll notice that the dot is

Wildcards not working

2002-10-27 Thread mike
I am trying to cd into a directory referenced by a value in a list with wildcards like shell command ls test* or cd test* however nothing seems to work, I have tried amongst others $dir9= system(ls $dir1.*\$); opendir(DIRLIST,.); $dir9=grep$dir1.*\$, readdir DIRLIST -- Linux, Gnome what more do

Re: Wildcards not working

2002-10-27 Thread Jeff 'japhy' Pinyan
On Oct 28, mike said: I am trying to cd into a directory referenced by a value in a list with wildcards like shell command First get the value from glob(): $value = foo*; @matches = glob $value; Then work with the values in @matches. -- Jeff japhy Pinyan [EMAIL PROTECTED]

ARGV

2002-10-27 Thread Mark Goland
hey guys, I am trying to run this code on ActiveState v5.6.1, doesnt seem to wanna print the arguments I am passing. Can some one please look over it and see if u can spot anything. #!c:\perl\bin\perl -w print $ARGV[0]\t$ARGV[1]\n; Thanx in Advance, Mark -- To unsubscribe, e-mail: [EMAIL

RE: ARGV

2002-10-27 Thread Beau E. Cox
Mark - Copied and ran you script exactly as you have shown and it works. I named it t02.pl, so I ran it like: c: perl t02.pl a b and got a b I am running ActivePerl 5.6.1 on W2K sp3. 1) Did your say 'perl' or just enter the script name? If not, try w/perl. 2) If that is the