Hello, I'm new to perlmonks.
So little introduction: I maintain Unix and Citrix application and using perl now for about 4 years.
Perl is THE language for me.
Problem: when i click on an url, i would like to obtain the value of it (fetch url). I did a lot of searching, and found hints but .....
Goal: create a page which shows the most viewed site on top.
I'm reading a csv file, and publish it in a web
Snippet:
sub print_prompt {
my($query) = @_;
open( INFILE, "$conf_file" ) or die "$!";
while (<INFILE>) {
chomp;
next if 0 == length($_); # Solves "Use o
+f uninitialized value in .......... "
my @elem = split ",";
print("$elem[0]\n") if $debug; #description
print("$elem[1]\n") if $debug; #URL
print("$elem[2]\n") if $debug; #nr how many tim
+es viewed the URL
print "<a href=$elem[1] target=\"_blank\" >$elem[0]</a><br>";
}
close INFILE;
}
Question: must it be i a form?
Must I use the "my $query = new CGI;" codes
I thought something whith:
print "This site : $ENV{'REQUEST_URI'}
\n";
print "Previous site : $ENV{'HTTP_REFERER'}
\n";
Thanks in advance,
Perlboer
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.