Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Appending string to all lines

by hippo (Bishop)
on Nov 11, 2016 at 16:10 UTC ( [id://1175756]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Appending string to all lines
in thread Appending string to all lines

That should indeed generate syntax errors because perl is not a valid function name in Perl. You can't just type random shell commands into perl and expect it to process them like your shell would - they are completely different systems.

#!/usr/bin/perl -n use strict; use warnings; chomp; printf "%sUF,A,Y,9,U\n", $_;

See perlrun for how to use flags like -n and perlfunc for a list of all the functions available. Note that I've made no attempt to optimise your algorithm here.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found