I am trying to use Perl to send email via SMTP server, however I cannot receive the mail.
=================
socket(SOCK, AF_INET, SOCK_STREAM, $proto) or return "Socket operation failed : Reason $!";
print "test";
connect(SOCK, pack('S n a4 x8', AF_INET(), $port...
I have a text file "test.txt":
----------
name age address
abc1 20 city1
abc2 15 city2
abc3 45 city3
abc4 19 city4
----------
How can I open this file and print out the new one which is sorted by age? Thanks.
I have a text file "test.txt":
----------
name age address
abc1 20 city1
abc2 15 city2
abc3 45 city3
abc4 19 city4
----------
How can I open this file, and print out the new one sorted by age? Thanks.
If I want to filter the string which has only character(A-z) or number (0-9), and ignore all the others, how can I do that?
for example: valid string is: aVc, a55,Zf2,4r4
invalid: a$g,4_y
I have two questions:
1)I setup the correct date(time) for linux server, why it changes after I reboot system? it seems not related to BIOS time.
how to fix it?
2) I have two hard drive in linux server, now I want to disable one of them, I disable it in BIOS, but linux still detects both hard...
this is probably a dummy question, after I ftp to a site, I can use "get,put" to handle single file, or use "mget, mput" to handle multiple files at the same directory, but how can I ftp whole directory(include sub-directory)?
Thanks for your help.
I can use /[?%.]/ to search the string which contains those character, but how I can search some characters such as "/", "$" etc..., anyone can help me?
I have html code:
------
<form action=admin.cgi method=post>
<input type=text name=name value="" onChange="this.form.url.value=this.value;">
<input type=text name=url value="">
------
Second text box can update the contents the same as first text box, now I want...
How can I create a html file(now just display on browser) by perl?
Now I can view this html page by:
print load_template("abc.html", {links => $link});
I want to generate a html file which don't have to be called by perl.
I have a login script using AuthCookieHandler, my .htaccess contains:
------
require valid-user
Options +Includes
<Files index.htm>
AddType text/html .htm
AddHandler server-parsed .htm
</Files>
------
which use SSI.
Problem: when I first login, it just shows a list of folders and files, cannot...
I have a login script using AuthCookieHandler, my .htaccess contains:
------
require valid-user
Options +Includes
<Files index.htm>
AddType text/html .htm
AddHandler server-parsed .htm
</Files>
------
which use SSI.
Problem: when I first login, it just shows a list of folders and files, cannot...
I am installing a login script which use Apache-AuthCookie, when I try to login, it accepts the username/password, also generates session key, however it cannot display the index page in protected area(The page cannot be displayed), what's wrong with it? I do have index.html in protected folder.
How can I remove characters from string, for example I want to remove "c" from:
gro1:aro1:a,b,c,d
gro2:aro2:a,b
gro3:aro3:a,b,c
gro4:aro4:a,b,c,d,e
how to write conditions?
I have @a
foreach $a (@a) {print $a;}
the result is: a11,a12,a13....
also I have @b
foreach $b (@b) {print $b};
the result is: b11,b12,b13....
how can I set the condition to compare $a, $b, for example if a11=b11 then print "matched".
In html form, I can write <form method=post action=sample.pl>....</form>
How can I call a subroutine in "sample.pl" from this form?
It doesn't work if I write <form method=post action=sample.pl?subname>...</form>
I have a script written in perl for member login, if I logout and refresh browser(IE5), it works fine to show login page, however if I logout and click "Back" button on the browser to previous html pages, the hyperlinks on those pages still work instead of showing login page.
I have script written in perl, the logout script works fine if I have only one html frame, however it doesn't work if I setup the html to two frames(top frame and main frame), the main frame handles perl script, when I try to logout, it doesn't delete cookie and stay in the same page when I...
I tried to send mail and failed:
1)
$recv="recipient\@host.com";
open(MAIL,"|/usr/lib/sendmail -t");
print MAIL "To: $recv\n";
.....
but this works:
2)
open(MAIL,"|/usr/lib/sendmail -t");
print MAIL "To: recipient\@host.com\n";
.....
is my 1)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.