Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: syntax questions

by toolic (Bishop)
on Mar 06, 2013 at 22:16 UTC ( #1022104=note: print w/replies, xml ) Need Help??

in reply to syntax questions

What does ${wfid} mean in here ? Is it same as $wfid ? If yes then why use this syntax ?
In your code, yes, ${wfid} is the same as $wfid. You would need the curlies if you had this instead (I deleted the dot):
$filelist = "$iwhome/tmp/filelist-${wfid}txt";

Without the curlies, you'd have a different variable: $wfidtxt:

$filelist = "$iwhome/tmp/filelist-$wfidtxt";

Refer to Scalar value constructors

Is file handler FILELIST adding members to $filelist ?
FILELIST is a file handle. Your open statement opens the file named $filelist for output. The print adds lines to the file.

Generally, you need not use &. Refer to Prototypes for gory details.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2018-02-20 22:13 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (274 votes). Check out past polls.