Martin,
After reading the doc on Win32::Threads, I don't think this solves my
problem. Especially since it's clearly stated that it's very experimental.
My application drives automated testing of space flight hardware and I have
to convince some very safety conscious people that the test system is
you cant use functions in double quotes. When you pass a string, you must
quote it, and leading ampersand is optional when you call it with
parenthesis...
print "Hello ",caps('shain')," Nice to see you today.\n";
sub caps {return uc shift};
-Original Message-
From: [EMAIL PROTECTED]
[mai
I know that perl can parse varibles and return the
results if a string has Scaler varibles within them. I
would like to figure out how to do the same with perl
and user defined functions.
Is there a way to do this within a double quoted
string?
example of what I would like to happen:
print "He
Sorry --
%hshDateLinks ('10/29/2002' => "http://site/date-maint-10292002";)
should be:
$hshDateLinks ('10/29/2002' => "http://site/date-maint-10292002";)
but you get the idea.
Here's the code that I've used now; but I'm *sure* that there's a simpler,
more elegant way to do this, r
Title: RE: Terrible at my logic
file 3
is a manual merge file. attached below is the file 2 and file
3.
if we
take a small example then .
All
the files are tabseparated text files.
file1
col1 col2 col3
col4
1text1text2
2text4text5
3text6
Title: RE: Terrible at my logic
easy with hashes.
#untested
my %hash1;
my %hash2;
open(FILE1, $file1) || die "Can't open $file1 :
$!\n";
foreach my $line ()
{
chomp($line);
my @line = split(/ +/,$line);
my $key = $line[0];
$hash1{$key} = join(" ",@line);
}
close(FILE1);
Title: RE: Terrible at my logic
your
data does not match with the info... =(
-Original Message-From: Mohanty, Debi (MED, TCS)
[mailto:[EMAIL PROTECTED]]Sent: Tuesday, October 29, 2002
12:46 PMTo:
[EMAIL PROTECTED]Subject: merging two
tabseparated text files.
Hi,
Pl
you can use crypt():
#!/usr/bin/perl -w
use strict;
print generate_password(), "\n" for 1..1000;
sub generate_password
return(substr(crypt("",join('',(0..9,'A'..'Z','a'..'z')[rand 62,rand
62])), -8 ));
}
if you want to check if the same string is generated, you can write some
control struct
Hello David,
hmmm i am wondering if use of Threads module will not do the work for
you...it works same on win and on unix.but i think it will need to
recode your applicationnot sure bout it..
--
Best regards,
Martinmailto:corwin@;corwin.sk
Tuesday, October 2
I am attempting to migrate a Perl application I developed on
unix to win32 and I've run into a roadblock. This application executes
perl scripts via a pipe to drive automated regression tests of
hardware/software systems. My problem is that on unix I can use a named pipe to
executed test sc
Title: Message
Personally, I like
to use Crypt::GeneratePassword.
You can create passwords that are longer, yet easier for users
to remember and less likely to be written on a Post-it on their monitor.
-- Mark
Thomas
[EMAIL PROTECTED] Internet Systems Architect Use
Title: RE: Terrible at my logic
Hi,
Please any one suggest how can I add two tabseparated text
files in to one tabseparated text file.
In the
text file 1 and the text file2 One column is common to both the files. So Is
there any way by comparing the record no (which is present in both th
Title: RE: Terrible at my logic
sub GenRandomPW ($Length)
{
# This subroutine generate a
relatively strong random password of a specified length.
&WriteLog($LogFile, "Entered
GenRandomPW") if $DEBUG;
my $Length = shift;
my $password;
my @chars = ('A'..'H', '
Title: RE: Terrible at my logic
OH MY
GOD!!!
That
is soo overwhelming
I
don't have enough thatyou 's to say THANKYOU ALL SO VERY
MUCH
your
humble servant,
Hari.
Title: RE: Terrible at my logic
To make it even a little more fun you could also vary the length of the
password:
@a = (0..9,A..Z,a..z); # password
charactors
@b = (6..14);
# length of
password
for($I=0;$I<1000;$I++) {
for($x=0;$x<$b[rand @b];$x++) {
Title: RE: Terrible at my logic
perldoc -f rand
here's an example:
print int rand ;
-Original Message-From: Krishna, Hari
[mailto:[EMAIL PROTECTED]]Sent: Tuesday, October 29, 2002
12:48To: 'FARRINGTON, RYAN';
[EMAIL PROTECTED]Subject: Random
numbers
Hi
fr
Title: Message
$randomstring="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for
($ii=1;$ii<=1000;$ii++) {
$pwd = "";
for ($jj=1;$jj<=8;$jj++) {
$pwd .=
(split(//,$randomstring))[rand(length($randomstring))];
}
print "$pwd\n";
}
change
the list of
Title: RE: Terrible at my logic
@a =
(0..9,A..Z,a..z);
for($I=0;$I<1000;$I++)
{
for($x=0;$x<8;$x++) {
$index = rand @a;
print $a[$index];
}
print "\n";
}
-Original
Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Krishna, Har
Title: RE: Terrible at my logic
Hi
friends,
I want to generate some 1000 or more passwords for some NT
machine.
I
should be able to generate an 8 digit alphanumeric random numbers from the list
of characters.
Say I
have 3 strings...
First
string : 0 - 9 numbers
Second
string : A -
As far as I can tell, the return value from LWP::Simple::get is simply a
long string. In my case, I'm grabbing an HTML page that contains a list of
dates that link to maintenance notices for that date specified.
The input would look something like:
http://site/date-maint-10292002.html";>
Thanks Adrian!
-Original Message-
From: Stovall, Adrian M. [mailto:Adrian.Stovall@;durez.com]
Sent: Tuesday, October 29, 2002 11:12 AM
To: [EMAIL PROTECTED]
Subject: RE: Passing multiple hashes into a sub-routine and returning
them
foreach $key (keys %hash) {
print "key: $key -
Basically you may use something like this (note that this is old fashioned
perl style - before references were invented)
%a = (ak1 => av1, ak2 => av2);
%b = (bk1 => bv1, bk2 => bv2);
func (*a, *b);
foreach $a (keys %a)
{
print "$a => $a{$a}\n";
}
foreach $b (keys %b)
{
print "$b
foreach $key (keys %hash) {
print "key: $key - value: $hash{$key}\n";
}
The code above loops through the keys (in no particular order) and
prints each key along with its value.
> -Original Message-
> From: Reddy Kankanala [mailto:rkankanala@;Interelate.com]
> Sent: Tuesday, Octo
when you loop thru keys, is there a way to get the corresponding value?
-Original Message-
From: Thomas Drugeon [mailto:tdrugeon@;ina.fr]
Sent: Tuesday, October 29, 2002 10:39 AM
To: [EMAIL PROTECTED]
Subject: Re: Passing multiple hashes into a sub-routine and returning
them
hashes and o
24 matches
Mail list logo