Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^3: add letters to the begin of the sentence

by kcott (Chancellor)
on Sep 13, 2013 at 19:03 UTC ( #1054002=note: print w/replies, xml ) Need Help??

in reply to Re^2: add letters to the begin of the sentence
in thread add letters to the begin of the sentence

"Thank you, Ken. It works very well."

You're welcome.

"Would you help me identify the problem in my script."

Happy to.

"I moved the print after unless block but it still does not work."

Unfortunately, that doesn't help me to help you. What exactly did you move? Where precisely did you move it to? What does "it still does not work" mean?

You need to provide code along with expected results, actual results, and any error or warnings messages. This is all described in more detail in the "How do I post a question effectively?" guidelines.

Here's what choroba was referring to:

$ perl -Mstrict -Mwarnings -e ' my @fasta = (">dddd\n", "abcdef\n", ">eeee\n", "bcdef\n"); for (@fasta) { unless (/^>/) { s/^/ACGAGTGCGT/; } print; } ' >dddd ACGAGTGCGTabcdef >eeee ACGAGTGCGTbcdef

That may give you your answer. If not, post the requested information so that we can provide genuine help as opposed to guesswork.

-- Ken

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054002]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2018-06-17 22:30 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (107 votes). Check out past polls.