Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^3: Invoking API

by soonix (Monsignor)
on Jul 05, 2013 at 07:34 UTC ( #1042637=note: print w/replies, xml ) Need Help??

in reply to Re^2: Invoking API
in thread Invoking API

scalar localtime((stat($filename))[9]) is not a variable (although its result varies, of course), so I guess variable interpolation doesn't help here.

Here, I'd use the string concatenation operator, like this:

text =>$config_data[$i][0] . " Information Last Updated at: " . lo +caltime((stat($filename))[9]) );

My perl is a bit rusty (peak use was at the turn of the century), but AFAIR the scalar can be omitted here

Replies are listed 'Best First'.
Re^4: Invoking API
by mcoblentz (Scribe) on Jul 05, 2013 at 21:24 UTC
    1. Turns out there were extra parentheses in the scalar/localtime routine, which were closing out the text field early. Just another case of a "short circuit between the headphones". 2. Thanks to the respondents, who encouraged me to "pretty-fy" the API call; that's what led me to the cause.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1042637]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2018-05-21 09:47 GMT
Find Nodes?
    Voting Booth?