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

Re: pearl script working but is changing to attachment

by johngg (Canon)
on Feb 16, 2018 at 15:24 UTC ( #1209309=note: print w/replies, xml ) Need Help??


in reply to pearl script working but is changing to attachment

To expand on AnomalousMonk's reply, which should save you a heap of typing in the future, HEREDOCs interpolate by default and double quotes do not need to be escaped. Neither do you need explicit line terminators. Note also that, unless you have used select to nominate a different filehandle, STDOUT is the default handle for output and does not need to be supplied to print. To stop interpolation do print <<'EOT'; instead, look at the documentation for more.

This script

use strict; use warnings; my $your_email_address = q{fred.bloggs@worthy.com}; my $your_name = q{Fred Bloggs}; print <<EOT; <input type="hidden" name="your_email_address" value="$your_email_addr +ess"> <input type="hidden" name="your_name" value="$your_name"> EOT

Produces this output

<input type="hidden" name="your_email_address" value="fred.bloggs@wort +hy.com"> <input type="hidden" name="your_name" value="Fred Bloggs">

I hope this is helpful.

Cheers,

JohnGG

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2018-11-19 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (217 votes). Check out past polls.

    Notices?