Re: Perl CGI Security

2001-04-16 Thread Brent Michalski
Ray, The documentation at: http://www.perl.com/pub/doc/FAQs/cgi/www-security-faq.html is also a very good resource... If I *too* may inflect a bit of hubris... http://www.perlcgi-book.com Good luck! Brent

Re: how to use crypt() function to encrypt and decrypt shell user pass

2001-04-17 Thread Brent Michalski
Keep in mind that the crypt() function is ONE WAY! You can encrypt, but not decrypt. This may sound useless, but what you do is to encrypt what the user sends, ecrypt it, then compare the encrpted version with the encrypted password. If the two match, then the password was correct. Type: perl

List Suggestion

2001-04-17 Thread Brent Michalski
I am not sure who the listmaster is so... Would it be possible/feasable to add something like [beginner] to all of the subject lines of this mailing list? The HTML::Mason list adds [mason] to the beginning of each messages subject. This makes sorting and filtering much easier. Thanks, Brent

Re: login help

2001-04-17 Thread Brent Michalski
Have you tried looking at the ssh manpage? It states that you may want to try this... ssh -l username host good luck, Brent P.S.: For all of the beginners out there, don't forget about the man pages and documentation that is readily available on your system! The documentation is there to he

Re: problem with variables

2001-04-17 Thread Brent Michalski
To add to the answer(s) already given... for ($i=1 ; $i<4 ;$i++){ print $sup($i); } is actually quite cumbersome, and very 'C'-ish... Let's make it more Perl-ish... for my $i (1..4){ print $i; } There is not need to have to deal with incrementing and checking conditions in loops - Perl

RE: problem with variables

2001-04-18 Thread Brent Michalski
lt;[EMAIL PROTECTED]> Sent by: To: "'Brent Michalski'" beginners-return-

Re: Looking for perl specifications on the net

2001-04-23 Thread Brent Michalski
Take a look at the Perl Style Guide... http://www.perl.com/CPAN-local/doc/manual/html/pod/perlstyle.html Brent "Zysman, Roiy" <[EMAIL PROTECTE

Re: IDE for perl?

2001-05-09 Thread Brent Michalski
PerlBuilder by SolutionSoft is a good product. Also, ActiveState has a Perl IDE as well. I have not used the ActiveState one yet though brent

Re: Perl4 to Perl5.6.1 up gradation.

2001-05-18 Thread Brent Michalski
Wow, first off let me say that it is SCARY that you are using Perl4 in a production environment! Perl 4 is VERY old and has many bugs/holes that have been fixed in the past few YEARS! Perl 4 was released over 10 years ago!! And Perl 5 was released 7 years ago! You will most likely run into iss

Re: INTERESTING!!!!

2001-05-24 Thread Brent Michalski
I prefer above all other options HTML::Mason. Simply, it rocks! details: http://www.masonhq.com justin todd <[EMAIL PROTECTED]>

Re: iinfinite loop

2001-05-30 Thread Brent Michalski
Because the while loop will loop for as long as $data is "true" or contains data Considering that it has data in it, you have created an "infinite" loop David Gilden

Re: iinfinite loop

2001-05-30 Thread Brent Michalski
OOps, hit send too soon... This is _not_ the same as reading from a filehandle! while () is NOT the same as while($variable) {unless $variable is a filehandle} If working with a filehandle, the while will loop until no data is left. With a string, it will just keep looping while true (data i

RE: create a new file

2001-06-01 Thread Brent Michalski
Oops, I think you are a bit confused... '>' will overwrite the file NOT append. You want '>>' to append. Brent Andrew Prueser

Re: Any Perl to Pager module?

2001-06-08 Thread Brent Michalski
Yes! A quick search on "search.cpan.org" for "pager" reveals the Net::Pager module... It is easy to use and does all of it's communication via the web. There are several pager networks that it has hooks into and is free for personal use if I remember correctly. Hell, I use it for personal us

Re: Issuing rollback() for database handle being DESTROY'd without explicit disconnect().

2001-06-11 Thread Brent Michalski
I saw no $dbi->disconnect; statement in your code. If you do not disconnect, and the program ends, you will get the above message brent "FLAHERTY,

Re: Why do I have to type 'perl programname.pl' ???

2001-06-11 Thread Brent Michalski
as long as you have your: #!/usr/bin/perl line at the top... The only other thing you should need to do is to make the program executable chmod 755 programname.pl the 755 is just an example, not necessarily right in all cases... you may want to read up a bit on unix permissions to get a c

Re: chomp ?

2001-06-26 Thread Brent Michalski
Ok, this is not an RTFM post! The easiest way to find out what a particular command does is with the perldoc program. On the system that has Perl installed, please type the following: perldoc -f chomp You will get the documentation for this function! Easy huh?!!! Give that a read, then if y

Re: Problems with ^M

2001-07-16 Thread Brent Michalski
IIRC perl -pi -e 's/\r//' works very well also... Brent [EMAIL PROTECTED]

Re: AW: y me

2001-08-02 Thread Brent Michalski
... brent "Alessandro Lenzen" To: "Brent Michalski"

Re: y me

2001-08-03 Thread Brent Michalski
Heehee, I have seen this before and it is enough to drive a person crazy! Add a \n to the end. So you have... print ("hello world.\n"); I bet that this "fixes" your program... Brent

Re: If Statement won't work

2001-08-06 Thread Brent Michalski
Works fine for me It prints a "1", just like it is supposed to. Are you looking for some other behavior??? Brent mail@redhotsw

Re: does foreach choose in order?

2001-08-08 Thread Brent Michalski
Yes, for and foreach will select the elements of the array starting at 0 and ending at the last element. It is the %hash that you are thinking of that does not read data in the order in which they were put into it... HTH, Brent

Re: Image not coming in perl script while displaying n simple html with thesame path..Why?

2001-08-09 Thread Brent Michalski
Have you tried adding the path to the image? You didn't provide much information, so I am going to make a few assumptions: Assumption 1: - Your HTML file that you are testing is in the /htdocs directory Assumption 2: - Your CGI script is in the /cgi-bin directory I realize that you said you h

Re: Matching strings

2001-08-09 Thread Brent Michalski
Don't diddle with $_ so much... You make things more confusing Here is what I see (forgive any formatting errors, using Lotus NOTes)... while() { $line = $_; # You are setting $line to the current value from chomp($line); # Getting rid of \n's etc.. (EOL chars) # Now here, why a

Re: perl4 vs. perl5

2003-02-04 Thread Brent Michalski
Ken, The fact that our military is still using something THAT antiquated and bug riddled is embarassing. I realize that for many things, cost is involved and it makes it harder to push through. Perl is free! Although if the A.F. wishes, I'd be happy to install it for them for a whole lotta mon

Re: How does one print blocks of text ..

2003-02-06 Thread Brent Michalski
print qq( This is all going to "be printed" and so is this and this\n ); or print< cc: (bcc: Brent Michalski/STL/MASTERCARD) Sent by: newsSubject: How does one print bl

RE: Book on Perl!

2002-09-10 Thread Brent Michalski
ROTECTED] >cc: (bcc: Brent Michalski/STL/MASTERCARD) Subject: RE: B

Re: help with redirect in CGI.pm

2002-10-15 Thread Brent Michalski
ROTECTED] xas.edu> cc: (bcc: Brent Michalski/STL/MASTERCARD) Subject: help with redirec

RE: Julian Date

2002-11-08 Thread Brent Michalski
<[EMAIL PROTECTED]To: Steve <[EMAIL PROTECTED]>, [EMAIL PROTECTED] in> cc: (bcc: Brent Michalski/ST

RE: Perl Cgi/ Why?

2002-12-12 Thread Brent Michalski
Brent "Paul Kraus" , "'Perl'" <[EMAIL PROTECTED]> .com>cc:

Re: How do I get and save an image off of a web page

2002-03-27 Thread Brent Michalski
I just had to do this for a project and found that that HTML::LinkExtor module works perfect for this! There is even an example in the docs that shows how to filter out everything except images if i remember correctly. Just do a search for Extor at search.cpan.org Good luck! Brent

Re: perl / database question

2002-04-02 Thread Brent Michalski
Just quicky, this is what I see. 1) Use the DBI module and the DBD::Pg driver. DBI is very well documented. I've written several articles that use it, it is covered in my book Writing CGI Applications with Perl (Kevin Meltzer wrote this with me also). 2) Biggest problem: while ( my($first, @

Re: Taint checking a bunch of word input

2002-04-10 Thread Brent Michalski
Well, I am guessing that you use some sort of whitespace between words, like a space. The below regex does not include the space character! Change your character set to include more characters.. From: [a-zA-Z0-9\.,;:] To: [a-zA-Z0-9\.,;: ] Or, to save a few chars.. [\w\.,;: ] Would be a sta

Re: The book Learning Problem

2002-04-29 Thread Brent Michalski
Not to plug my own book, but have you taken a look at "Writing CGI Applications with Perl"? (ok, I plugged my own book, sue me ;o) ) Myself and Kevin Meltzer took a different approach to how this book is laid out. It is not a bunch of theory and extra reading. Instead, we list real-world ex

Re: Database question?

2001-08-24 Thread Brent Michalski
Ok, first, let's use placeholders for you data... And lets use the ORDER BY clause... $query = prepare ("SELECT field1,field2,field3,field4 FROM table1 WHERE field2 like 2282 AND $ like '$' ORDER BY field2"); $data = $query->execute($searchmode, $showmode); Give that a try... Note: I did no

Re: Perl by Example

2001-09-24 Thread Brent Michalski
Teresa, I'd have to highly recommend "Writing CGI Applications with Perl". Myself and Kevin Meltzer wrote it, so we may be a bit biased towards it though But, it has received great reviews from several people. :o) Brent

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

2001-11-09 Thread Brent Michalski
St. Louis, Missouri -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: perl script to remove control M's

2001-12-06 Thread Brent Michalski
I always like to simply use: perl -pi -e 's/\r//' I have this line posted im my work-area, along with the Java solution... The Java solution is > 40 lines and imports several libraries... Brent

Re: HTML Cleaner-Upper Module

2001-12-19 Thread Brent Michalski
Give http://perltidy.sourceforge.net a shot, it is very good. brent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Form to Flatfile

2001-12-19 Thread Brent Michalski
I have solved this in the past by replacing the carriage-returns with tags... do a s/\015?\012//g; on each line BEFORE you write it to the flat-file hth, brent "

Re: Help with negitive query results in Perl and MySql

2002-01-24 Thread Brent Michalski
Jim, Why not try something like this: (The code is "SLIGHTLY" different than yours, but does the same thing... Basically, the query result is the complete set of what you were looking for. if you need the inverse of this, change the SQL to read NOT IN instead of just IN Hope this helps! Brent

Re: Why cant perl resolve this address?

2002-01-25 Thread Brent Michalski
AAARGH, MY EYES;o) Use a forward slash! It should work no problem in Win. system("copy \"C:\\Documents and Settings\\ryang\\Start Menu\\Programs\\Yardi 4.3\\*.*\" \"$comp\\c\$\\winnt\\profiles\\all users\\start menu\\programs\\Yardi 4.3\\\"") || print "Failed!" && next; Wo

Re: Looking for Mod 10 check digit routine

2002-02-08 Thread Brent Michalski
A quick jaunt over to http://search.cpan.org reveals Search: mod10 --- no results. Search: credit RESULTS! Give the Business::CreditCard module a try. Actually, it is what I use quite often... Good luck! Brent