Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Problems? Is your data what you think it is?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

"this is the one which i wrote by myself if its wrong plz letme knw"

I'm sure if you ran your script you'd see it was wrong, in the sense that it doesn't work. Here is an example which does what I think you are trying to do:

#!/usr/bin/perl use strict; use warnings; my $word1 = 'Hcr1fa.fa'; # you missed the ; if ( $word1 eq "chr1.subst.fa" ){ # I added quotes print "$word1\n"; } elsif ( $word1 eq "Hcr1fa.fa" ) { print "$word1\n" }

Now I'm sure you know what you're trying to achieve with your code, I don't. My code prints the value of $word1 if the value is "chr1.subst.fa" or "Hcr1fa.fa". You'll see from the code and the comments that I added quotes around chr1.subst.fa, are you expecting this string or are you trying to match something else?

When you previewed your post, you must have seen that something was wrong with the formatting. Your closing code tag should be </code> rather than <\code>.

Here are some links I think you should read and understand:




  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others browsing the Monastery: (9)
    As of 2014-04-25 09:43 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (586 votes), past polls