Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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 all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (7)
    As of 2018-06-24 03:43 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (126 votes). Check out past polls.