in reply to Re^3: Why can't I use s///
in thread Why can't I use s///
omg it works!
thank you! I'd buy you a digital beer.
Anyway I think I found out the reason.
my $text="../files/jack/2012/derpone.pdf"; $text = basename($text); my $cgi = CGI->new; #Instantiate a CGI class print $cgi->header, # First we create a header $cgi->start_html('My first Perl website'), # Begin HTML page $cgi->h1('Success'), # create the Tag <h1>TEXT</h1> $cgi->p($text),
This code works, the second one doesn't
my $cgi = CGI->new; #Instantiate a CGI class print $cgi->header, # First we create a header $cgi->start_html('My first Perl website'), # Begin HTML page $cgi->h1('Success'), # create the Tag <h1>TEXT</h1> my $text="../files/jack/2012/derpone.pdf"; $text = basename($text); $cgi->p($text),
It seems I can't initialize variables while printing HTML
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Why can't I use s///
by linuxer (Curate) on May 08, 2013 at 21:52 UTC | |
Re^5: Why can't I use s///
by Anonymous Monk on May 09, 2013 at 03:14 UTC |