Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Last mod on my Perl action page

by matija (Priest)
on May 17, 2004 at 19:47 UTC ( [id://354080]=note: print w/replies, xml ) Need Help??


in reply to Last mod on my Perl action page

You can't put a print in the middle of a here document. You should assign the value to a variable first,
$latmod=localtime((stat(/cgi-bin/dir/lastmodif.pl))[9]); print header, <<"EOF" ... <br>Last Modified: $lastmod</td> ...

Replies are listed 'Best First'.
Re: Re: Last mod on my Perl action page
by Fletch (Bishop) on May 17, 2004 at 19:53 UTC

    Not a print, but you can interpolate an arbitrary expression:

    print header, <<"EOF" ... <br/>Last Modified: @{[ scalar localtime( (stat( ".../blah" ))[9] ) ]} </td> ... EOF

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://354080]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-20 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found