* 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:
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]
* <[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/
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
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]
* 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
* 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
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
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: [
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]
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
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 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
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
;'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]
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.
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
/tcp openssh
25/tcp opensmtp
80/tcp openhttp
113/tcpclosed auth
jfranken@egal:~$ _
--
Johannes Franken
Professional unix/network development
mailto:[EMAIL PROTECTED]
http://
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]
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]
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
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]
-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
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
;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
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
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
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]
28 matches
Mail list logo