Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 exploiting the Monastery: (7)
As of 2018-09-20 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (178 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!