Search more than one wor in a string

Discussion in 'Perl Misc' started by Jochen Friedmann, Jun 30, 2004.

  1. Hello,

    my problem:

    I am looking for two words in a string var. If there are both words in it I
    want to bring out an error message.

    if (($param =~ m/move/gi)&&($param =~ m/copy/gi)){print "\n --- To much
    parameters /Copy or /Move";}


    Jochen
     
    Jochen Friedmann, Jun 30, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. knutivar
    Replies:
    2
    Views:
    352
    bruce barker
    Dec 9, 2004
  2. Lu
    Replies:
    2
    Views:
    759
    Mark McIntyre
    Jul 8, 2003
  3. Merciadri Luca
    Replies:
    4
    Views:
    851
  4. Steven D'Aprano
    Replies:
    0
    Views:
    143
    Steven D'Aprano
    Dec 23, 2013
  5. Replies:
    3
    Views:
    116
    Gary Herron
    Dec 23, 2013
Loading...

Share This Page