Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Invoking API

by soonix (Curate)
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


Comment on Re^3: Invoking API
Select or Download Code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2014-09-21 14:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (172 votes), past polls