Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Changing -> to work within a string

by fruiture (Curate)
on Mar 19, 2003 at 11:35 UTC ( #244310=note: print w/ replies, xml ) Need Help??


in reply to Changing -> to work within a string

I don't think it's a good idea to change Perl, because the interpolation rules are very basic and you would affect (=break) _a lot_ of other things. If somebody wants to use Perl, he/she should try to understand the very basics and if your beginners are unable to figure out that bit of concatenation, which i don't believe, they're absolutely not to be confronted with a programming language at all.

You _could_ instead of $machine have a magic %machine hash that via tie()ing invokes methods on FETCH:

"some string with $machine{work_dir} in it"

But this is a workaround, i believe it's easier to explain the simple syntax than to write that TIEHASH-module (which isn't too hard itself).

--
http://fruiture.de


Comment on Re: Changing -> to work within a string
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (13)
As of 2015-07-07 20:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls