"Charles K.                                                   
             Clarkson"                                                     
             <[EMAIL PROTECTED]                                          To 
             .net>                     <beginners-cgi@perl.org>            
                                                                        cc 
             10/20/2005 07:35                                              
             PM                                                    Subject 
                                       RE: implementing links on a system  
                                       command output                      
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           







[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> wrote:

: ok here is what I am trying to do. In the atached doc it shows
: output from my perl cgi program ...

    You sent this as a MS Word document. When I open it, Word
converts it to a word web view and when I view the code I get a
Word trashed html file listing. Can you send this as a raw text
file instead? The Word format is pretty useless.

<excerpt>

 <html xmlns:v="urn:schemas-microsoft-com:vml"
 xmlns:o="urn:schemas-microsoft-com:office:office"
 xmlns:w="urn:schemas-microsoft-com:office:word"
 xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
 xmlns="http://www.w3.org/TR/REC-html40";>

 <head>
 <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
 <link rel=Original-File href="file:///FOOBAR%20on%20links.doc">
 <meta name=ProgId content=Word.Document>
 <meta name=Generator content="Microsoft Word 10">
 <meta name=Originator content="Microsoft Word 10">
 <link rel=File-List href="FOOBAR%20on%20links_files/filelist.xml">
 <link rel=Edit-Time-Data href="FOOBAR%20on%20links_files/editdata.mso">
 <!--[if !mso]>
 <style>
 v\:* {behavior:url(#default#VML);}
 o\:*
{behavior:url(#default#VML);}
 w\:* {behavior:url(#default#VML);}
 .shape
{behavior:url(#default#VML);}

</excerpt>

    Not what I think really came out
of your CGI script.



[snip]


: sf.H02047 capacity: 189.1G space: 117.7G.

[snip]


:
Is this more clearer?

    No. I still don't have more than the above sample
of what an
H string is. You also haven't shown source code that allows me to
answer your need, and you have not restated the problem you are
having. I am
not going back into the thread to find out what your
problem is.

    Let's go
back to the beginning.

    1 - Show me what is you are starting with. Use a
large sample.
        Not just one input. Be that a file or a list or
whatever.

    2 - Show me the results you expect the script to display.

    3
- Show me what you have got for code so for. Edit out any
        sensitive
items like passwords and things.

    Don't send these back as anything but
raw text files. Do not
send Word documents. I'd like to help but you are
giving much of
the wrong information. Lean toward giving us too much
information
rather than too little.


HTH,

Charles K. Clarkson
-- 
Mobile Homes
Specialist
254 968-8328


-- 
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
<http://learn.perl.org/> <
http://learn.perl.org/first-response>
**************************************************************************************************************************************************************
**************************************************************************************************************************************************************

ok beginning it is......

I am starting with a view from a radio button that displays how much space
is remaining in each pool labeled as fs_heartlab.1 and fs_heartlab.2.
Under these headings are H strings and from each H string I am trying to
set-up a link to push me to another page that displays a data set as such:
sf.H02047 capacity: 189.1G space: 117.7G.
The difficulty is that $_ is an entire block of data that includes more
than just H strings and therefore I cannot link all of $_ which is why I
placed just the H strings
from $_ in an array.  From this array, I was thinking of traversing
through, running the command to get the capacity data.

thx for the persistence!




HERE IS $_
********************

fs_heartlab.1
 sort:path
 media: sg
 Volumes:
   H01192
   H01193
   H01195
   H01196
   H01197
 Total space available:  111.3G

fs_heartlab.2
 sort:path
 media: sf
 Volumes:
   H02047
   H02048
   H02051
   H02052
   H02000
   H02039
   H02040
   H02041
 Total space available:  527.8G

FUTURE RESULTS FROM THIS LINK.....
OR Here is the "new" data set:
****************************************************************

  sg.H01192               capacity:   39.1G space:   31.4G  -il-o-b-----
  sg.H01193               capacity:   20.0G space:   20.0G  -il-o-b-----
  sg.H01195               capacity:   20.0G space:   20.0G  -il-o-b-----
  sg.H01196               capacity:   20.0G space:   20.0G  -il-o-b-----
  sg.H01197               capacity:   20.0G space:   20.0G  -il-o-b-----


##### BEGIN CODE #####

use strict;
use warnings;
use CGI qw(:standard), (-unique_headers);
use CGI::Carp qw(fatalsToBrowser);
use MIME::Lite ();
our $flag=0;
my $time = localtime;
$ENV{"PATH"} = qq(/opt/SUNWsamfs/sbin:/usr/bin);
delete @ENV{qw (IFS CDPATH BASH_ENV) };
$| =1; ##-- Turn off buffering --##

##-- BEGIN MAIN CGI ##--##

my $q = new CGI;
print   $q->header,
        $q->start_html ('OhioHealth I.S. ASM server: stkv440'),
# Header
        $q->h1 ({-style=>'Color:blue'},'OhioHealth ASM Intranet Page:');
# Body

##-- Print the 1st form --##

print $q->hr;

print $q->startform;

print "<P><H3>Please Select a View Below for ASM Tape Pool Status or System
Status. </P></H3>",

$q->radio_group
.
.
.

                        viewhrtlab();
                        my @Harray=();
                        my $i=0;
                        my ($H9840vols,$H9940vols) =0;
                        #my $SF='sf.';
                        sub viewhrtlab
                        {
                                open (ARC, "archiver -v |") or error();
                                foreach (<ARC>)
                                {
                                        print "<H3>";
                                        if (/(?i)fs_heartlab\.1/ ..
/(?i)fs_lanv1.1/)
                                        {
                                                s<fs_lanv1.1><>;
                                                $flag=1;
                                                if ($flag==1)
                                                {
                                                        if (/(?i)total
space available:/)
                                                        {
                                                                print
"<p><b><font color=#0000CC><u>$_";
                                                        }
                                                        else {
                                                                #print
"<p><A HREF=$_></p></b></font></u></A>";
                                                                print
"<p></b></font></u>$_";
                                                }
                                                if ( /(?i)h01/g )
                                                {
                                                        $H9840vols++;
                                                        $Harray[$i++] = $_;
                                                }
                                                if ( /(?i)h02/g )
                                                {
                                                        $H9940vols++;
                                                }
                                        }

                                } ##-- END FORLOOP ON LINE 565 --##
print @Harray,"\n";

                                close (ARC) or warn "Was unable to close FH
at line 593 $!";



(See attached file: FOOBAR on links II.txt)

Attachment: FOOBAR on links II.txt
Description: Binary data

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Reply via email to