Melissa Cama wrote: > > Hi, Hello,
> I'm just new to Perl and have no idea where to start with the > task that I have to complete. Any help would be appreciated. > > Currently when a particular .exe is run, the following is > displayed in the command window - > > License server on host "kronos". > Running since Monday 4/04/96 15:53:13. > > LICENSES: > Max-Users Expires Password [status] > 19 none 2aae4b60.b4ac4f0f.02 [Valid] > > Maximum active users allowed: 19 > Current active users: 6 > Available licenses: 13 > > ACTIVE users: > User Priority Time-out in > rdc 2 59 minutes (at 10:44:20) > chris 1 26 minutes (at 10:10:45) > cheryl none 23 minutes (at 10:07:27) > > License Usage Statistics: > 2 licenses revoked today 4/14/96. > 0 license requests denied. > 0 active users bumped by preferred user. > > From this i need to extract "just" the user names and place > them into an external file. How do I go about this? Here is one way to do it: #!/usr/bin/perl -w use strict; open OUT, '> external_file.txt' or die "Cannot open 'external_file.txt': $!"; for ( `particular.exe` ) { if ( /^\s+User\s+/ .. /^\s*$/ ) { next if /^\s+User\s+/ or /^\s*$/; my $user = (split)[0]; print OUT "$user\n"; } } __END__ John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]