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

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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?

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

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (14)
    As of 2015-11-30 16:18 GMT
    Find Nodes?
      Voting Booth?

      What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

      Results (777 votes), past polls