Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Strings with undefined variables?

by jimpudar (Pilgrim)
on Jan 05, 2019 at 01:58 UTC ( [id://1228061]=note: print w/replies, xml ) Need Help??


in reply to Strings with undefined variables?

I have used the substitution method before with good success, wrapping keywords like this: %keyword%

However, you might also consider using function calls...

#! /usr/bin/env perl use strict; use warnings; use 5.10.0; sub url { 'http://something.com/api_stuff/' . shift } say 'POST->' . url('1234');

πάντων χρημάτων μέτρον έστιν άνθρωπος.

Log In?
Username:
Password:

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

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

    No recent polls found