Hi, This is an extract of my file : Total Hard Errors: 0 Total Soft Errors: 0 Total Queue Length: 0 Name LUN 259 Minimum latency reads N/A How can I get the number '259' my script : open L_NAVICLI , "$NAVICLI $IP1 getall |" ; while (<L_NAVICLI>) { if (/Name.*LUN.*.(\d+)/){ $lunid = $3; print "\n!$lunid!\n"; print $_; exit; } } close L_NAVICLI; When i execute it, it returns : # perl capacx.pl !! Name LUN 259 Can you help me please to get the number '259' in my var $lunid ?? Thanks a lot Xossa
In reply to Parse a File and get a value by xossa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |