Hello,
I am attempting to create a filehandle that reads the output of a TSM query (tape drive status) from a file and then creates a hash table of the library drive number and its corresponding status.
Here is what the TSM output file typically looks like:
ANR8330I LTO volume 000165L1 is mounted R/O in drive MT1.0.0.3 (mt1.0.0.3), status: IN USE.
ANR8330I LTO volume 000290L1 is mounted R/W in drive MT1.0.0.2 (mt1.0.0.2), status: IN USE.
ANR8329I LTO volume 000114L1 is mounted R/W in drive MT0.0.0.2 (mt0.0.0.2), status: IDLE.
I want to create a hash table named %drvstat
So, for the above example, the hash slices would be:
$drvstat{"MT1.0.0.2"} = 'IN USE'
$drvstat{"MT0.0.0.2"} = 'IDLE'
I am a novice and am having a bit of trouble getting started, anyone willing to help a newbie out? Thanks!
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, details, 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, summary, 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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.