<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl pattern searching - help needed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131354#M805002</link>
    <description>I don't believe I did that. No points.&lt;BR /&gt;&lt;BR /&gt; [dev] # x=xyz&lt;BR /&gt; [dev] # export x&lt;BR /&gt; [dev] # echo $x&lt;BR /&gt;xyz&lt;BR /&gt; [dev] # perl -e 'print "uvwxyz" =~ /$ENV{x}/ ? "Yes\n" : "No\n";'&lt;BR /&gt;Yes&lt;BR /&gt; [dev] # perl -e 'print "uvwyz" =~ /$ENV{x}/ ? "Yes\n" : "No\n";' &lt;BR /&gt;No&lt;BR /&gt; [dev] # &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JW.</description>
    <pubDate>Sun, 30 Nov 2003 18:56:49 GMT</pubDate>
    <dc:creator>John Wright_1</dc:creator>
    <dc:date>2003-11-30T18:56:49Z</dc:date>
    <item>
      <title>Perl pattern searching - help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131347#M804995</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a perl statement in a UNIX Shell script. I am using the perl statement for pattern maching.I have got the pattern in an UNIX variable 'x'. I want to use this variable for the pattern searching in the perl statement which is like:&lt;BR /&gt;&lt;BR /&gt;perl -ne 'if (/pattern/) {.....}&lt;BR /&gt;&lt;BR /&gt;I want the pattern to have the value of 'x'. Is it possible. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Andy</description>
      <pubDate>Fri, 28 Nov 2003 19:42:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131347#M804995</guid>
      <dc:creator>Anand_30</dc:creator>
      <dc:date>2003-11-28T19:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Perl pattern searching - help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131348#M804996</link>
      <description>You can use $x,&lt;BR /&gt;&lt;BR /&gt;i.e.&lt;BR /&gt;&lt;BR /&gt;perl -ne 'if (/$x/) {.....}&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Fri, 28 Nov 2003 19:51:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131348#M804996</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2003-11-28T19:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Perl pattern searching - help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131349#M804997</link>
      <description>Thanks for the reply Karthik,&lt;BR /&gt;&lt;BR /&gt;I have tried using $x but it doesn't work.&lt;BR /&gt;&lt;BR /&gt;-Anand</description>
      <pubDate>Fri, 28 Nov 2003 19:54:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131349#M804997</guid>
      <dc:creator>Anand_30</dc:creator>
      <dc:date>2003-11-28T19:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Perl pattern searching - help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131350#M804998</link>
      <description>Anand,&lt;BR /&gt;&lt;BR /&gt;I think the following link might help you,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://zamov.online.fr/EXHTML/Perl/Perl_27283.html" target="_blank"&gt;http://zamov.online.fr/EXHTML/Perl/Perl_27283.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Fri, 28 Nov 2003 19:58:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131350#M804998</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2003-11-28T19:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Perl pattern searching - help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131351#M804999</link>
      <description>Anand,&lt;BR /&gt;&lt;BR /&gt;I tried the following and it works,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;---------&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;if ( $#ARGV != 1 )&lt;BR /&gt;{&lt;BR /&gt; print "Usage: test.pl string_to_searched string\n";&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{ &lt;BR /&gt; $x = $ARGV[0];&lt;BR /&gt; $test = $ARGV[1];&lt;BR /&gt; &lt;BR /&gt; if ( $test =~ /$x/ ) &lt;BR /&gt;  {&lt;BR /&gt;   print "String contains $x in it! \n";&lt;BR /&gt;  } &lt;BR /&gt;  else &lt;BR /&gt;  { print "I am Sorry!! $x is not found in string \n";&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;--------------&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Fri, 28 Nov 2003 21:24:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131351#M804999</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2003-11-28T21:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Perl pattern searching - help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131352#M805000</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;$ myvar="Hello World!"&lt;BR /&gt;$ export myvar&lt;BR /&gt;$ perl -e 'print $ENV{myvar} . "\n";'&lt;BR /&gt;Hello World!&lt;BR /&gt;$ &lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;  JW.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 30 Nov 2003 18:37:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131352#M805000</guid>
      <dc:creator>John Wright_1</dc:creator>
      <dc:date>2003-11-30T18:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Perl pattern searching - help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131353#M805001</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;Here is an example with pattern matching.&lt;BR /&gt;&lt;BR /&gt; [dev] # x=xyz&lt;BR /&gt; [dev] # export x&lt;BR /&gt; [dev] # perl -e 'if ("uvwxyz" =~ /$ENV{var}/){print "match\n";}else{print "no match\n";}'&lt;BR /&gt;match&lt;BR /&gt; [dev] # perl -e 'if ("uvwyz" =~ /$ENV{var}/){print "match\n";}else{print "no match\n";}' &lt;BR /&gt;no match&lt;BR /&gt; [dev] #&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;  JW.&lt;BR /&gt;</description>
      <pubDate>Sun, 30 Nov 2003 18:45:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131353#M805001</guid>
      <dc:creator>John Wright_1</dc:creator>
      <dc:date>2003-11-30T18:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Perl pattern searching - help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131354#M805002</link>
      <description>I don't believe I did that. No points.&lt;BR /&gt;&lt;BR /&gt; [dev] # x=xyz&lt;BR /&gt; [dev] # export x&lt;BR /&gt; [dev] # echo $x&lt;BR /&gt;xyz&lt;BR /&gt; [dev] # perl -e 'print "uvwxyz" =~ /$ENV{x}/ ? "Yes\n" : "No\n";'&lt;BR /&gt;Yes&lt;BR /&gt; [dev] # perl -e 'print "uvwyz" =~ /$ENV{x}/ ? "Yes\n" : "No\n";' &lt;BR /&gt;No&lt;BR /&gt; [dev] # &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JW.</description>
      <pubDate>Sun, 30 Nov 2003 18:56:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-pattern-searching-help-needed/m-p/3131354#M805002</guid>
      <dc:creator>John Wright_1</dc:creator>
      <dc:date>2003-11-30T18:56:49Z</dc:date>
    </item>
  </channel>
</rss>

