I have seen (and have written) perl code such as:
use Win32::OLE;
# use existing instance if Excel is already running
eval {$ex = Win32::OLE->GetActiveObject('Excel.Application')};
die "Excel not installed" if $@;
unless (defined $ex) {
$ex = Win32::OLE->new('Excel.Application', su
> Any known moon calculator for the moon phases (moon calendar). Ideas
appreciated.
I've never used it, but you might look at Astro::Moonphase
Regards,
Rick
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveSt
Assuming this line is typical, here is a script which gives a couple of ways
to approach the regex:
$text = 'LOG_INFO : cpcdos22.col.bsf.alcatel.fr: read request for
/bootp/cygwin.bat: success.';
print "$1 \n" if $text =~ /\/(.+):/;
print "$1 \n" if $text =~ /\/([^\/]+):/;
Which outputs:
I use Multi-Edit.
Without going into the myriad of features, I will say this: It has done
whatever I need, regardless of what I'm editing. It handles Perl, Unix
shell files, HTML, Java, JavaScript, DOS Batch files, and everything else I
have *ever* edited. I've even used it to fix damaged Word
Actually that's probably about as good as any other way. Quoting from the
Perl Cookbook: "Making random numbers is hard."
Also from the Perl Cookbook, here is a way to generate a 10 character string
'randomly':
@chars = ( "A" .. "Z", "a" .. "z", 0 .. 9 );
$password = join( "", @chars[ map { ra
>> If I had a complex ANDed expression, I'd just hard code it in the
>> subroutine.
>>
>> For something simple, such as the word TABLE followed somewhere by the
word
>> ALIGN, you could use:
>>
>> my $stringToFind = 'TABLE.+ALIGN';
>>
>>
>> Regards,
>>
>> Rick
>Sure, if you wanted to match VEGE
David,
You might check this link: http://dynamicnet.net/support/fp/perlwithPWS.htm
It covers Microsoft Personal Web Server with perl. I had to adjust the
paths in the registry, but otherwise it worked fine. Since the Registry
mods are so easy, it's simple to test.
Regards,
Rick Evans
I believe this snippet of code does what you ask.
It finds all files containing a specific string
Since it prints line number and filename as it goes,
there is no need to store them, as you could capture the results.
Regards,
Rick Evans
__BEGIN__
use strict;
if ( opendir( DIR, '.' ) ) {
my @htmlFiles = grep { /\.html?$/i } readdir(DIR);
closedir( DIR );
print "Deleting the following file(s):\n ";
print join "\n ", @htmlFiles;
unlink @htmlFiles;
}
Works in current directory.
You [c|sh]ould add an error check to the unlink.
> I have an array with value of 1-10.
> What is the fastest way to 'reverse' the values to 10-1 (ie. 10 9 8 7 6
...)
Use reverse...
@list = (1 .. 10);
print join " ", @list, "\n";
@list = reverse @list;
print join " ", @list, "\n";
___
Perl-Win32-User
10 matches
Mail list logo