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:

Re: Dumb question

2002-04-23 Thread Johannes Franken
an perlop for more information about quote operators. -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Convert Number In Strings to Numeric Form

2002-04-15 Thread Johannes Franken
* <[EMAIL PROTECTED]> [2002-04-15 15:45 +0200]: Sorry, cut&paste did it again. In my mail, please replace > @sorted_alphabetically = sort {$a <=> $b} @mylist; with @sorted_alphabetically = sort {$a cmp $b} @mylist; -- Johannes Franken Professional unix/

Re: Convert Number In Strings to Numeric Form

2002-04-15 Thread Johannes Franken
rator: <=> to sort numerically (1,2,10,...) and cmp to sort alphabeteically (1,10,2,...). Examples: @sorted_numerically= sort {$a <=> $b} @mylist; @sorted_alphabetically = sort {$a <=> $b} @mylist; perldoc -f sort for more examples. -- Johannes Fra

Re: How use command line parameters?

2002-04-15 Thread Johannes Franken
e: while (<>) { print "got line: $_"; } man perlop for more info this. -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Decimal numbers

2002-04-15 Thread Johannes Franken
* Ho, Tony <[EMAIL PROTECTED]> [2002-04-15 12:15 +0200]: > If I read a value of 123.456 and I would like to print this value out as > 123456 (without decimals), how can I go about it without doing any > multiplication ? $value=~y/.//d; -- Johannes Franken Profession

Re: remove a char

2002-03-29 Thread Johannes Franken
* Michael Gargiullo <[EMAIL PROTECTED]> [2002-03-29 07:26 +0100]: > the words all end with a comma. How can I strip that comma? chop; -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTE

Re: Module to check email address in real time?

2002-03-19 Thread Johannes Franken
hen he replies to that mail, you can upgrade him from a delivery-pipe. That's the way I used for my guestbook, as in http://www.jfranken.de/impressum/gaestebuch.en.html -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To

Re: Saving Files on c:

2002-03-18 Thread Johannes Franken
opefully not what you expected. On dos compatible systems like mswindows, try opening ">$path/news.db" or ">$path\\news.db" instead. -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [

Re: problem redirecting STDOUT to file in TCP socket server script

2002-03-16 Thread Johannes Franken
look at "perldoc -f fork" or "man perlipc" -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Writing to beginning of file

2002-03-11 Thread Johannes Franken
p; [1] 18464 # cat backwards third second first # echo fourth >> regular # cat backwards fourth third second first # _ Now you can easily replace the last two steps with perl. You append to the "regular" file and read from the "backwards" one. -- Johannes Franken

Re: suidperl problem

2002-03-10 Thread Johannes Franken
On Sat, Mar 09, 2002 at 12:37:23AM +0100, Patrik Schaub [FMS] wrote: > the script needs to have root rights in order to do this, > but it will be used by another user. suidperl seems to be > the only way to achive this. What about sudo ? -- Johannes Franken Professional uni

Re: HTTPS --> HTTP::Request

2002-03-06 Thread Johannes Franken
re what you need to extract from it, but you can fetch a page over https like this: use Net::SSLeay; ($page) = get_https('www.bacus.pt', 443, '/'); -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e

Re: sendmail

2002-03-04 Thread Johannes Franken
rect his index page to /xyz/abc.htm If he doesn't want - you can't. But this has nothing to do with perl anyway. -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: Cookies, What's wrong with this?

2002-03-03 Thread Johannes Franken
;'answers'); # $query->cookie('answers') will work too! -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: FW: Perl install on Win XP

2002-03-02 Thread Johannes Franken
On Sat, Mar 02, 2002 at 08:11:48PM +0200, Shaun O'Reilly wrote: > assign the extension .PL [...] > Perl.exe or Perl.dll or create a new one called Perl.pl? assign it to perl.exe -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.

Re: Finding numbers ONLY in a variable

2002-02-23 Thread Johannes Franken
g else in that line (surrounded by ^$) So your code is: if ($var!~/^\d+$/) { print "You entered letters of the alphabet please try again :)"; } else { print "U entered only digits... WELL DONE!"; } For more information on regular expressions in perl, have a look at man

Re: net::telnet

2002-02-23 Thread Johannes Franken
/tcp openssh 25/tcp opensmtp 80/tcp openhttp 113/tcpclosed auth jfranken@egal:~$ _ -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://

Re: net::telnet

2002-02-23 Thread Johannes Franken
8.220.254.2','208.220.254.3'); foreach $host(@hosts){ $result ='Active'; $telnet->open($host) or $result ='Not Active'; print " 25 port on $host is $result\n"; $telnet->close; } -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Timestamp and File::find

2002-02-22 Thread Johannes Franken
nd( \&wanted, "/tmp/"); -------- -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: renaming files (versioning)

2002-02-22 Thread Johannes Franken
back to an old version by "co -l -r versionnumber data.txt" - "rcsdiff -r1.30 -r1.25" would show you the lines that had changed between those two versions. - lots more to see. -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www

Re: How to I am not sure how to reference a perl script from the web

2002-02-21 Thread Johannes Franken
erver's /cgi-bin/ directory. -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Sending Mail

2002-02-21 Thread Johannes Franken
-bin/formmail.cgi&[EMAIL PROTECTED]&=www.jfranken.de/cgi-bin/formmail.cgi HTTP/1.1" 404 226 65.164.164.99 - - [15/Feb/2002:15:33:17 +0100] "GET /cgi-bin/formmail.pl?[EMAIL PROTECTED]&[EMAIL PROTECTED]&subject=www.jfranken.de/cgi-bin/formmail.pl&=www.jfranken.de HTTP/1

Re: $ENV{remote_user}?

2002-02-21 Thread Johannes Franken
ript works for you: #!/usr/bin/perl -w use CGI; my $q=new CGI; print $q->header,"You are user ",$q->remote_user; Good luck! -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubsc

Re: Sending Mail

2002-02-21 Thread Johannes Franken
;datasend("Subject: $subject\n") or die; # Mail (RFC822) -Body $smtp->datasend("\n$text\n") or die; $smtp->dataend() or die; $smtp->quit or die; # HTML Feedback to the user print "Content-Type: text/html\n\nYour message was sentcontinue"; exit -- Jo

Re: Illegal seek

2002-02-20 Thread Johannes Franken
print FTPSCR "cd $sourcedir\n"; print FTPSCR "lcd $destdir\n"; print FTPSCR "get $file\n"; print FTPSCR "bye\n"; close FTPSCR; man perlopentut for more information about communicating to a pipe. -- Johannes Franken Professi

Re: Perl and apache

2002-02-19 Thread Johannes Franken
r or Group defined in httpd.conf should be able to r and x the script and the dirs above. In doubt, just chmod 555 the script. - Try it again (via shell and browser). If it still doesn't work, please post the full shell output. -- Johannes Franken Profess

Re: Regexp help

2002-02-18 Thread Johannes Franken
ipadress $mac"; system($cmd); on a unix system, man perlre is your friend... -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]