<?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 Help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674377#M658612</link>
    <description>Thanks JRF!!&lt;BR /&gt;&lt;BR /&gt;that was simply awesome... &lt;BR /&gt;&lt;BR /&gt;Two things I need to discuss further on this  - &lt;BR /&gt;&lt;BR /&gt;1) push @names, ( $res =~ m{^".+apps.*"\s*=\s*"(.+)"} );&lt;BR /&gt;&lt;BR /&gt;The above string, shouldn't it produce &lt;BR /&gt;&lt;BR /&gt;"AcctInfoapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo&lt;/A&gt;"&lt;BR /&gt;&lt;BR /&gt;but produces just the url... want to understand how?&lt;BR /&gt;&lt;BR /&gt;One more thing I want to do is to append a URI to the URL that I got from above - &lt;BR /&gt;&lt;BR /&gt;2)Then append the uri cgi-bin/jboss/apps.joa/health?method=checkurl to each of the urls (from 1) and run wget against each URL.&lt;BR /&gt;&lt;BR /&gt;Can you address these two things as well?&lt;BR /&gt;&lt;BR /&gt;Thanks so much!&lt;BR /&gt;Allan&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 16 Aug 2010 23:47:39 GMT</pubDate>
    <dc:creator>Allanm</dc:creator>
    <dc:date>2010-08-16T23:47:39Z</dc:date>
    <item>
      <title>Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674370#M658605</link>
      <description>Hi Folks,&lt;BR /&gt;&lt;BR /&gt;I created a Perl script to do a wget on an URL.&lt;BR /&gt;&lt;BR /&gt;Script's output is like the following - &lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt; "_exp" = "81652254";&lt;BR /&gt; "apps" = {&lt;BR /&gt;  "AcctInfoapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo&lt;/A&gt;";&lt;BR /&gt;  "StatContentapps" = "&lt;A href="http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent" target="_blank"&gt;http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent&lt;/A&gt;";&lt;BR /&gt;  "ContappsB2B" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content&lt;/A&gt;";&lt;BR /&gt;  "CommQandAStatisticapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats&lt;/A&gt;";&lt;BR /&gt;  "SerialNberapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;";&lt;BR /&gt; };&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;What I need is the following - &lt;BR /&gt;&lt;BR /&gt;1)is to store the output to an array and parse out http://...:port (e.g. - &lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/)" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/)&lt;/A&gt; &lt;BR /&gt;and the appname (e.g. SerialNberapps )&lt;BR /&gt;and store in scalar.&lt;BR /&gt;&lt;BR /&gt;2)Then append the uri cgi-bin/jboss/apps.joa/health?method=checkurl to each of the urls  (from 1)&lt;BR /&gt;&lt;BR /&gt;3) echo appname and again run wget against each url from 2.&lt;BR /&gt;&lt;BR /&gt;Here is the script that I created - &lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl -w &lt;BR /&gt;&lt;BR /&gt;use LWP::UserAgent;&lt;BR /&gt;$ua = LWP::UserAgent-&amp;gt;new;&lt;BR /&gt;$ua-&amp;gt;agent("Mozilla/8.0");&lt;BR /&gt;&lt;BR /&gt;$req = HTTP::Request-&amp;gt;new(GET =&amp;gt; '&lt;A href="http://apps.zaphida.com:8501/jboss/Service.woa/mea?method=getServices');" target="_blank"&gt;http://apps.zaphida.com:8501/jboss/Service.woa/mea?method=getServices');&lt;/A&gt;&lt;BR /&gt;$req-&amp;gt;header('Accept' =&amp;gt; 'text');&lt;BR /&gt;&lt;BR /&gt;$res = $ua-&amp;gt;request($req);&lt;BR /&gt;&lt;BR /&gt;if ($res-&amp;gt;is_success) {&lt;BR /&gt; print $res-&amp;gt;decoded_content;&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt; print "Error: ". $res-&amp;gt;status_line."\n";&lt;BR /&gt;}</description>
      <pubDate>Fri, 13 Aug 2010 03:37:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674370#M658605</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2010-08-13T03:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674371#M658606</link>
      <description>&lt;!--!*#--&gt;Hi Allan:&lt;BR /&gt;&lt;BR /&gt;See if this snippet guides you:&lt;BR /&gt;&lt;BR /&gt;# cat ./fetch&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;{&lt;BR /&gt;    $/ = undef;&lt;BR /&gt;    my $str = &lt;DATA&gt;;&lt;BR /&gt;    $str =~ m{SerialNberapps".+"(.+)"} and print $1, "\n";&lt;BR /&gt;}&lt;BR /&gt;__DATA__&lt;BR /&gt;{&lt;BR /&gt;"_exp" = "81652254";&lt;BR /&gt;"apps" = {&lt;BR /&gt;"AcctInfoapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo&lt;/A&gt;";&lt;BR /&gt;"StatContentapps" = "&lt;A href="http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent" target="_blank"&gt;http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent&lt;/A&gt;";&lt;BR /&gt;"ContappsB2B" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content&lt;/A&gt;";&lt;BR /&gt;"CommQandAStatisticapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats&lt;/A&gt;";&lt;BR /&gt;"SerialNberapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;";&lt;BR /&gt;};&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# ./fetch&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;/DATA&gt;</description>
      <pubDate>Fri, 13 Aug 2010 12:30:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674371#M658606</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-08-13T12:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674372#M658607</link>
      <description>Hi JRF,&lt;BR /&gt;&lt;BR /&gt;The string matching is a problem cause I can have 50+ appnames in the the output and I need a non hard code way of parsing out the http://...:port and appname.&lt;BR /&gt;&lt;BR /&gt;Also once I have the http://...:port URL I want to append a certain uri to the URLs (http://....port ) and echo appname and run a wget against each one of the appended URL so as to check their health.&lt;BR /&gt;&lt;BR /&gt;The output would be something like this &lt;BR /&gt;&lt;BR /&gt;Appname1&lt;BR /&gt;Status - OK&lt;BR /&gt;Appname2&lt;BR /&gt;Status - WARN&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allanm&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Aug 2010 16:20:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674372#M658607</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2010-08-13T16:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674373#M658608</link>
      <description>&lt;!--!*#--&gt;Hi (again) Allan:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; The string matching is a problem cause I can have 50+ appnames in the the output and I need a non hard code way of parsing out the http://...:port and appname.&lt;BR /&gt;&lt;BR /&gt;Then consider this prototype:&lt;BR /&gt;&lt;BR /&gt;# cat ./fetch&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;{&lt;BR /&gt;    $/ = undef;&lt;BR /&gt;    my $str = &lt;DATA&gt;;&lt;BR /&gt;    my @names = ( $str =~ m{SerialNberapps".+"(.+)"}g );&lt;BR /&gt;    print "$_\n" for @names;&lt;BR /&gt;}&lt;BR /&gt;__DATA__&lt;BR /&gt;{&lt;BR /&gt;"_exp" = "81652254";&lt;BR /&gt;"apps" = {&lt;BR /&gt;"AcctInfoapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo&lt;/A&gt;";&lt;BR /&gt;"StatContentapps" = "&lt;A href="http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent" target="_blank"&gt;http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent&lt;/A&gt;";&lt;BR /&gt;"ContappsB2B" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content&lt;/A&gt;";&lt;BR /&gt;"CommQandAStatisticapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats&lt;/A&gt;";&lt;BR /&gt;"SerialNberapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;";&lt;BR /&gt;};&lt;BR /&gt;}&lt;BR /&gt;{&lt;BR /&gt;"_exp" = "81652254";&lt;BR /&gt;"apps" = {&lt;BR /&gt;"AcctInfoapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo&lt;/A&gt;";&lt;BR /&gt;"StatContentapps" = "&lt;A href="http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent" target="_blank"&gt;http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent&lt;/A&gt;";&lt;BR /&gt;"ContappsB2B" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content&lt;/A&gt;";&lt;BR /&gt;"CommQandAStatisticapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats&lt;/A&gt;";&lt;BR /&gt;"SerialNberapps" = "&lt;A href="http://spaceqa4-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa4-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;";&lt;BR /&gt;};&lt;BR /&gt;}&lt;BR /&gt;{&lt;BR /&gt;"_exp" = "81652254";&lt;BR /&gt;"apps" = {&lt;BR /&gt;"AcctInfoapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo&lt;/A&gt;";&lt;BR /&gt;"StatContentapps" = "&lt;A href="http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent" target="_blank"&gt;http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent&lt;/A&gt;";&lt;BR /&gt;"ContappsB2B" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content&lt;/A&gt;";&lt;BR /&gt;"CommQandAStatisticapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats&lt;/A&gt;";&lt;BR /&gt;"SerialNberapps" = "&lt;A href="http://spaceqa5-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa5-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;";&lt;BR /&gt;};&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;...thus:&lt;BR /&gt;&lt;BR /&gt;# ./fetch&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa4-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa4-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa5-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa5-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;...which collects all matches into an array whose elements are then printed for demonstration.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;/DATA&gt;</description>
      <pubDate>Fri, 13 Aug 2010 16:40:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674373#M658608</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-08-13T16:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674374#M658609</link>
      <description>Hi (again) Allan:&lt;BR /&gt;&lt;BR /&gt;Maybe I'm being too obtuse.  Your wrote:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; ... store the output to an array and parse out http://...:port (e.g. -&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/)" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/)&lt;/A&gt;&lt;BR /&gt;and the appname (e.g. SerialNberapps )&lt;BR /&gt;and store in scalar.&lt;BR /&gt;&lt;BR /&gt;Given that $res-&amp;gt;decoded_content has the output you could do:&lt;BR /&gt;&lt;BR /&gt;# push @names, $1 if $res-&amp;gt;decoded_context =~ m{SerialNberapps".+"(.+)"};&lt;BR /&gt;&lt;BR /&gt;...to collect the "appname" URLs into an array.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 13 Aug 2010 17:31:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674374#M658609</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-08-13T17:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674375#M658610</link>
      <description>The string matching just gets me SerialNberapps but not the other apps like &lt;BR /&gt;AcctInfoapps, StatContentapps ....&lt;BR /&gt;&lt;BR /&gt;Is there a way to get those? More like a generic way to loop through them in an array/hash?&lt;BR /&gt;&lt;BR /&gt;Sorry if I may not have been clear earlier...&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan</description>
      <pubDate>Fri, 13 Aug 2010 21:00:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674375#M658610</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2010-08-13T21:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674376#M658611</link>
      <description>Hi (again) Allan:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; The string matching just gets me SerialNberapps but not the other apps like&lt;BR /&gt;AcctInfoapps, StatContentapps ....&lt;BR /&gt;&lt;BR /&gt;Yes:&lt;BR /&gt;&lt;BR /&gt;# cat ./fetch&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;my $res;&lt;BR /&gt;my @names;&lt;BR /&gt;while ( $res = &lt;DATA&gt; ) {&lt;BR /&gt;    push @names, (  $res =~ m{^".+apps.*"\s*=\s*"(.+)"} );&lt;BR /&gt;}&lt;BR /&gt;print "$_\n" for @names;&lt;BR /&gt;__DATA__&lt;BR /&gt;{&lt;BR /&gt;"_exp" = "81652254";&lt;BR /&gt;"apps" = {&lt;BR /&gt;"AcctInfoapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo&lt;/A&gt;";&lt;BR /&gt;"StatContentapps" = "&lt;A href="http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent" target="_blank"&gt;http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent&lt;/A&gt;";&lt;BR /&gt;"ContappsB2B" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content&lt;/A&gt;";&lt;BR /&gt;"CommQandAStatisticapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats&lt;/A&gt;";&lt;BR /&gt;"SerialNberapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;";&lt;BR /&gt;};&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# ./fetch&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent" target="_blank"&gt;http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;/DATA&gt;</description>
      <pubDate>Fri, 13 Aug 2010 23:00:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674376#M658611</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-08-13T23:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674377#M658612</link>
      <description>Thanks JRF!!&lt;BR /&gt;&lt;BR /&gt;that was simply awesome... &lt;BR /&gt;&lt;BR /&gt;Two things I need to discuss further on this  - &lt;BR /&gt;&lt;BR /&gt;1) push @names, ( $res =~ m{^".+apps.*"\s*=\s*"(.+)"} );&lt;BR /&gt;&lt;BR /&gt;The above string, shouldn't it produce &lt;BR /&gt;&lt;BR /&gt;"AcctInfoapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo&lt;/A&gt;"&lt;BR /&gt;&lt;BR /&gt;but produces just the url... want to understand how?&lt;BR /&gt;&lt;BR /&gt;One more thing I want to do is to append a URI to the URL that I got from above - &lt;BR /&gt;&lt;BR /&gt;2)Then append the uri cgi-bin/jboss/apps.joa/health?method=checkurl to each of the urls (from 1) and run wget against each URL.&lt;BR /&gt;&lt;BR /&gt;Can you address these two things as well?&lt;BR /&gt;&lt;BR /&gt;Thanks so much!&lt;BR /&gt;Allan&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Aug 2010 23:47:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674377#M658612</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2010-08-16T23:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674378#M658613</link>
      <description>Hi JRF,&lt;BR /&gt;&lt;BR /&gt;Can you please answer my above questions.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan</description>
      <pubDate>Tue, 17 Aug 2010 15:40:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674378#M658613</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2010-08-17T15:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674379#M658614</link>
      <description>Hi JRF,&lt;BR /&gt;&lt;BR /&gt;I was expecting result in the following format - &lt;BR /&gt;&lt;BR /&gt;./fetch.pl&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/apps.joa/health?method=checkurl" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/apps.joa/health?method=checkurl&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://egq3-wsf-5001.corp.zaphida.com:8531/cgi-bin/jboss/apps.joa/health?method=checkurl" target="_blank"&gt;http://egq3-wsf-5001.corp.zaphida.com:8531/cgi-bin/jboss/apps.joa/health?method=checkurl&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:9203/cgi-bin/jboss/apps.joa/health?method=checkurl" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:9203/cgi-bin/jboss/apps.joa/health?method=checkurl&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8546/cgi-bin/jboss/apps.joahealth?method=checkurl" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8546/cgi-bin/jboss/apps.joahealth?method=checkurl&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/cgi-bin/jboss/apps.joa/health?method=checkurl" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/cgi-bin/jboss/apps.joa/health?method=checkurl&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I need the output to be stored in a data structure so I can run LWP/wget against each URL and get the health status output.&lt;BR /&gt;&lt;BR /&gt;Sorry I am still learning perl and need to get a hang of it.&lt;BR /&gt;&lt;BR /&gt;Your help is most appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Aug 2010 19:36:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674379#M658614</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2010-08-17T19:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674380#M658615</link>
      <description>&lt;!--!*#--&gt;Hi Allan:&lt;BR /&gt;&lt;BR /&gt;# cat ./fetch&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;my $uri = q(cgi-bin/jboss/apps.joa/health?method=checkurl);&lt;BR /&gt;my $res;&lt;BR /&gt;my @names;&lt;BR /&gt;while ( $res = &lt;DATA&gt; ) {&lt;BR /&gt;    push @names, $res =~ m{^".+apps.*"\s*=\s*"(.+:\d+/)};&lt;BR /&gt;}&lt;BR /&gt;for (@names) {&lt;BR /&gt;    my $wget = $_ . $uri;&lt;BR /&gt;    print "$wget\n";&lt;BR /&gt;}&lt;BR /&gt;__DATA__&lt;BR /&gt;{&lt;BR /&gt;"_exp" = "81652254";&lt;BR /&gt;"apps" = {&lt;BR /&gt;"AcctInfoapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/OrderManagementapps-MEA.joa/accountInfo&lt;/A&gt;";&lt;BR /&gt;"StatContentapps" = "&lt;A href="http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent" target="_blank"&gt;http://egq3-wsf-5001.corp.zaphida.com:8531/service/staticcontent&lt;/A&gt;";&lt;BR /&gt;"ContappsB2B" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:9203/jboss/apps.joa/content&lt;/A&gt;";&lt;BR /&gt;"CommQandAStatisticapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8546/service/qastats&lt;/A&gt;";&lt;BR /&gt;"SerialNberapps" = "&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/jboss/apps.joa/serial&lt;/A&gt;";&lt;BR /&gt;};&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# ./fetch&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/apps.joa/health?method=checkurl" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:7322/cgi-bin/jboss/apps.joa/health?method=checkurl&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://egq3-wsf-5001.corp.zaphida.com:8531/cgi-bin/jboss/apps.joa/health?method=checkurl" target="_blank"&gt;http://egq3-wsf-5001.corp.zaphida.com:8531/cgi-bin/jboss/apps.joa/health?method=checkurl&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:9203/cgi-bin/jboss/apps.joa/health?method=checkurl" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:9203/cgi-bin/jboss/apps.joa/health?method=checkurl&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8546/cgi-bin/jboss/apps.joa/health?method=checkurl" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8546/cgi-bin/jboss/apps.joa/health?method=checkurl&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://spaceqa3-svc.corp.zaphida.com:8341/cgi-bin/jboss/apps.joa/health?method=checkurl" target="_blank"&gt;http://spaceqa3-svc.corp.zaphida.com:8341/cgi-bin/jboss/apps.joa/health?method=checkurl&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;...the regular expression matches the URL that begins a line (^) with a double quote; followed by one or more characters (.+); the sequence "apps"; zero or more characters (.*); a double quote; optional whitespace (\s*); an equal sign; some more optional whitespace; and a double quote.  The next sequence in parentheses is captured in a variable named $1.  We look for one or more characters; a colon; one or more digits; and a forward slash.  This is the URL we will stuff into our array.&lt;BR /&gt;&lt;BR /&gt;m{^".+apps.*"\s*=\s*"(.+:\d+/)};&lt;BR /&gt;&lt;BR /&gt;Having loaded an array with the URLs we want, we can loop through that array and concatenate (that's the dot operator) the URI you want to form a new variable to pass to a wget().&lt;BR /&gt;&lt;BR /&gt;If you like, you could extract the URL and concatenate before stuffing your array variable, or simply extract and concatenate into a variable that you immediately use with wget().&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;/DATA&gt;</description>
      <pubDate>Fri, 20 Aug 2010 20:59:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/4674380#M658615</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-08-20T20:59:06Z</dc:date>
    </item>
  </channel>
</rss>

