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

Re^4: How to use __DATA__ efficiently, help!

by Anonyrnous Monk (Hermit)
on Feb 09, 2011 at 20:02 UTC ( #887268=note: print w/replies, xml ) Need Help??


in reply to Re^3: How to use __DATA__ efficiently, help!
in thread How to use __DATA__ efficiently, help!

$_.=s/<--date\/\/>/$date/;

You probably meant

$_ =~ s/<--date\/\/>/$date/; ...

or just (as $_ is the default anyway)

s/<--date\/\/>/$date/; ...

s/// returns the number of substitutions made, so as you have it, you're appending that number to $_.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://887268]
help
Chatterbox?
[Tux]: test

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-09-19 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (225 votes). Check out past polls.

    Notices?