Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: puts vs say

by Your Mother (Archbishop)
on Feb 13, 2021 at 07:51 UTC ( [id://11128324]=note: print w/replies, xml ) Need Help??


in reply to Re^2: puts vs say
in thread puts vs say

You never have to type boilerplate if you use a template for new scripts. Command line is even better–

perl -E 'say "What you will."'

Replies are listed 'Best First'.
Re^4: puts vs say
by LanX (Saint) on Feb 13, 2021 at 14:50 UTC
    > type boilerplate if you use a template for new scripts

    even w/o template, overhead doesn't become bigger.

    use v5.12; makes the use strict; line obsolete

    c:\Strawberry>perl -e"use v5.12; say 'works'" works c:\Strawberry>perl -e"use v5.12; say $x" Global symbol "$x" requires explicit package name (did you forget to d +eclare "my $x"?) at -e line 1. Execution of -e aborted due to compilation errors. c:\Strawberry>

    update

    So it's actually one character less.

    Not sure why they didn't include "warnings" too.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-26 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found