One way (probably not the most elegant)
set a flag variable to 0
my $flagv=0
foreach to read file
{
$flag=1 if (/^NC00/);
if ($flag)
{
store line
increment counter
if counter >5 $flag=0
}
--
Chris D. Garringer
LAN/WAN Supervisor
Toshiba International
713-466-0277 x
chomp $character;
You need to get rid of the newline character at the end of every string
from
On Wed, 14 Nov 2001, samuel wrote:
> Hi there!
> i'm seeking for help on something which should b easy, but has
> turned into my personal hell.
> i'm trying to compare character (but i guess it appl
Recently I had a problem where I had to loop through a set of shares (actually NetWare
servers and volumes), map a drive, execute a program (that requires a drive mapping,
UNC will not work), delete the drive mapping. I could not find a way to map/unmap a
drive in Perl. I ended up calling a b
Odom" <[EMAIL PROTECTED]> 08/10/01 10:01AM >>>
Chris Garringer [mailto:[EMAIL PROTECTED]] said:
>
> I need to read a Win2k Event log (Application).
> ...
> I got the Win32::Eventlog module and setup per the documentation
> ...
> use Win32::Eventlog;
> ...
&g
I need to read a Win2k Event log (Application). I am running Active State (downloaded
last week) on this machine. I got the Win32::Eventlog module and setup per the
documentation (I think)
use strict;
use Win32::Eventlog;
..
$Win32::Eventlog::GetMessageText=1;
my
$evtflags=$Win32::Eventlog::E
Excel should only see the \t character. It sounds as though the \t is not being
picked up correctly. Have you tried a comma delimiter? It not Perl, but I have had
better luck with comma or semi-colon delimiters with Excel.
Chris D. Garringer
LAN/WAN Manager
Master Certified Netware Engineer
I am attempting to write a log analysis program in Perl for a Windows app. I normally
use Linux/Unix so Bill'sMoneyMachine can frustrate me.
Log files are generated when 1) the program restarts, or 2) the file size exceeds
10MB. So I need to pass to the program a file spec to catch 1 days log
I have a data structure $logs[]{}{}[] that has the data parsed from a log file. I
need to print the structure in a form that managment can understand. My problem is, I
can fill the structure correctly but cannot seem to get a handle on printing it to
allow printing the parts in a decent form.
I think that is right, I admit that Perl's data structures confuse me and I don' t
have it right yet.
I have a program that has an array of days of the month, the array value is a hash,
the value of the hash is a hash, and its value is an array
$logs[$day]{}{}[]
This structure works fine to loa
Blunder matches on the under at the end of the string. If you want to match only under
m/^under$/
Chris D. Garringer
LAN/WAN Manager
Master Certified Netware Engineer
Microsoft Certified Systems Engineer
Certified Solaris Administrator
Red Hat Certified Engineer
[EMAIL PROTECTED]
fax 713-896-526
ls format is OS dependant. On Solaris ls returns a multiple column list, so the first
line would be multiple filenames.
Chris D. Garringer
LAN/WAN Manager
Master Certified Netware Engineer
Microsoft Certified Systems Engineer
Certified Solaris Administrator
Red Hat Certified Engineer
[EMAIL PROT
Its not matching a blank line somewhere in the file try
/^(\d{3})/ && $users{$1} = "Offline";
so a key is created only if the match succeeds
Chris D. Garringer
LAN/WAN Manager
Master Certified Netware Engineer
Microsoft Certified Systems Engineer
Certified Solaris Administrator
Red Hat
Try $item=~/^\d{3}/;
Chris D. Garringer
LAN/WAN Manager
Master Certified Netware Engineer
Microsoft Certified Systems Engineer
Certified Solaris Administrator
Red Hat Certified Engineer
[EMAIL PROTECTED]
fax 713-896-5266
>>> Tom Yarrish <[EMAIL PROTECTED]> 06/20/01 01:51PM >>>
Hey all,
Well, th
I've run Activestate perl on NT and W2000. On NT I had to use perl .
On 2000 I only need the program name. What would be required on a "consumer" rather
that "business' M$ Operating system I don't know. It "should" be a matter of
associating the extension you are using with the perl program
14 matches
Mail list logo