ideas?
Mathew
Why not just declare @array like this:
my @array = (All, A - H, I - P, Q - Z);
and then later push new variables onto it, like so:
push @array, qw/1 2 3/;
--
Flemming Greve Skovengaard FAITH, n.
a.k.a Greven, TuxPower Belief without evidence in what
John W. Krahn wrote:
Flemming Greve Skovengaard wrote:
Travis Thornhill wrote:
I need to make strings of variable length for testing inputs.
The strings can contain any letter, say 'a', and I need to be able
to create the string with
255, 256 or any length.
Is there a quick and easy
);
for (1..$length) {
$index = int rand(scalar @letters-1);
$rand_string .= $letters[$index];
}
print $rand_string, \n;
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven, TuxPowerThe world is doomed to die
[EMAIL PROTECTED
the months are 0-indexed (0-11), so
timelocal(0,0,0,31,8,2006) is 2006-7-31 *not* 2006-8-31.
It also say so in the documentation.
perldoc Time::Local
Hope it helps.
--
Flemming Greve SkovengaardThe killer's breed or the Demon's seed,
a.k.a Greven, TuxPowerThe glamour
Joshua Colson wrote:
On Thu, 2006-06-08 at 00:55 +0200, Flemming Greve Skovengaard wrote:
If you are just going to print the day number and you have other dates in a
similar format why not just use:
print +(split /\s+/, $date)[2];
Well, in this particular instance, I am. However, there have
in a
similar format why not just use:
print +(split /\s+/, $date)[2];
--
Flemming Greve SkovengaardThe killer's breed or the Demon's seed,
a.k.a Greven, TuxPowerThe glamour, the fortune, the pain,
[EMAIL PROTECTED] Go to war again, blood is freedom's stain,
4181.33
. $yday is the day of the year, in
the range 0..364 (or 0..365 in leap years.)
$isdst is true if the specified time occurs during
daylight savings time, false otherwise.
Hope it helps.
--
Flemming Greve Skovengaard Man still has one
is not imported at ... when using 'use strict;'
( as you should ).
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven, TuxPowerThe world is doomed to die
[EMAIL PROTECTED] Fire in the sky
4112.38 BogoMIPS
is valid.
ftp:/foo is valid.
why http://; and ftp:/foo can pass the check?
Because ((http|ftp):\/\/) is optional ( the ? following it does that ),
so any line with anything between the start and end of the line will pass.
--
Flemming Greve Skovengaard FAITH, n.
a.k.a Greven, TuxPower
! India Matrimony: Find your life partneronline.
Post your code if you want help, most of us don't have psychic powers :)
--
Flemming Greve SkovengaardThe killer's breed or the Demon's seed,
a.k.a Greven, TuxPowerThe glamour, the fortune, the pain,
[EMAIL PROTECTED
;
my $i = $img_tag-[1]; # attributes of this img tag
my $code = $i-{'src'};
if($counter == 11) {
print $code\n;
last;
}
}
But there is properly a better solution.
--
Flemming Greve Skovengaard FAITH, n.
a.k.a Greven, TuxPower
requires explicit package name at ./checksum.pl
line 14.
Good, now you're on the right track. Declare those variables ( with my ) and
read the reply by John W. Krahn.
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven, TuxPower
Bastian Angerstein wrote:
Why does this dont work in my Script?
open (TEST, /tmp/test.txt);
while (TEST) {
print $_;
# or just
print;
}
Does the file exists and can you read it?
--
Flemming Greve SkovengaardThe killer's breed or the Demon's seed,
a.k.a Greven, TuxPower
Bastian Angerstein wrote:
Joop,
if I use open... or die $! i see that the file is opened correctly but nothing is in
$_.
-Ursprngliche Nachricht-
Von: Flemming Greve Skovengaard [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 26. Oktober 2004 11:45
An: [EMAIL PROTECTED]
Cc: Bastian
Perl guru,
you know, while I can't answer why one work and the other doesn't someone else
on the list might.
And again, please bottompost.
--
Flemming Greve Skovengaard FAITH, n.
a.k.a Greven, TuxPower Belief without evidence in what is told
[EMAIL PROTECTED
/bin/chmod
thanks
Try to add this lines somewhere the top of the file:
use strict;
use warnings;
and report the errors, if any.
--
Flemming Greve Skovengaard Just a few small tears between
a.k.a Greven, TuxPower Someone happy and one sad
[EMAIL PROTECTED
. How?
Regards
Sreedhar
$msg2 = ;
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven, TuxPowerA tale of death and doom
[EMAIL PROTECTED] Odin saw the final sign
4112.38 BogoMIPS The end
.
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven, TuxPowerThe world is doomed to die
[EMAIL PROTECTED] Fire in the sky
4112.38 BogoMIPS The end is coming soon
--
To unsubscribe, e-mail
as mention before.
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven, TuxPowerA tale of death and doom
[EMAIL PROTECTED] Odin saw the final sign
4112.38 BogoMIPS The end is coming soon
(.) at ./pingcheck line 7.
Use of uninitialized value in pattern match (m//) at ./pingcheck line 8.
^C
[EMAIL PROTECTED] gary]$
Don't you mean 'ping -n -c 50 10.1.1.31' instead of 'ping -n 50 10.1.1.31'.
Else read the man page for ping.
--
Flemming Greve Skovengaard Man still
Is that if I throw the array to another sub also means the
array would be copied and then pass to the target sub ?
Yes
while reference is using the same data in system memory?
Yes
Thanks
--
Flemming Greve Skovengaard FAITH, n.
a.k.a Greven, TuxPower Belief without evidence
as such :- 20040814
Can someone help me with that regex? I am having a frustrating time of
it!
Much appreciated
Denham
--
Flemming Greve Skovengaard Man still has one belief,
a.k.a Greven, TuxPower One decree that stands alone
[EMAIL PROTECTED
the Posix module?
also, why I ntoiced I had to may $month+1 otherwise it outputs a month
back. why is this?
thanks,
derek
printf (%02d/%02d/%02d\n, $month + 1, $day, $year - 100);
# Only works when $year 1999.
Try 'perldoc -f localtime' to learn why this works.
--
Flemming Greve Skovengaard
Bob Showalter wrote:
Flemming Greve Skovengaard wrote:
printf (%02d/%02d/%02d\n, $month + 1, $day, $year - 100);
# Only works when $year 1999.
And when $year = 2099 :~)
Stick to $year % 100;
Yes, you are correct. Your solution is fool proof.
--
Flemming Greve Skovengaard FAITH, n
, 0, 2 ) ) );
}
while (D)
if ( $_ =~ $foodate) {
It would work, if you use sprintf as shown above. But I would write:
if ( $_ =~ m/$foodate/ )
instead to eliminate confusesing when maintaining the code later.
.
}
--
Flemming Greve Skovengaard FAITH, n.
a.k.a Greven, TuxPower
.
Is this serious enough to make GD not work?
BTW, I am using:
Slackware 9.1 with kernel 2.6.7
Perl 5.8.4
and I have all the prerequisites for building GD from source.
--
Flemming Greve Skovengaard FAITH, n.
a.k.a Greven, TuxPower Belief without evidence in what is told
is download and install.
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven, TuxPowera tale of death and doom
[EMAIL PROTECTED] Odin saw the final sign
4112.38 BogoMIPS the end is coming soon
, foo bar is one argument.
How do I write this the right way?
My way works, 'cause I'm always right :)
No seriously TIMTOWTDI.
With kind regards
Met vriendelijke groet,
Maurice Lucas
TAOS-IT
--
Flemming Greve Skovengaard Man still has one belief,
a.k.a Greven, TuxPower
/8.1.7;
use strict;
use DBI;
use lib '/home/samcsm/jason/myperl/lib/perl5/site_perl/';
Use this one-liner to check your environment variables:
perl -Mstrict -we 'foreach my $key (sort keys %ENV) { print $key =
$ENV{$key}\n }'
--
Flemming Greve SkovengaardThe prophecy
Jaffer Shaik wrote:
Dear Friends,
My OS is unix.
Using perl, I want to read a pdf file and print its contents.
How can I achieve this using perl.
Regards,
Jaffer.
http://search.cpan.org/
Search for PDF
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven
( );
#---
sub dateme{
my $process_date=' ';
$process_date=localtime( );
return $process_date;
}
There is no problem in this sample code.
But somewhere else in your program you must use $process_date without
declaring it first.
--
Flemming Greve SkovengaardThe killer's breed
;'
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven, TuxPowera tale of death and doom
[EMAIL PROTECTED] Odin saw the final sign
4112.38 BogoMIPS the end is coming soon
--
To unsubscribe, e-mail
) you're bound
to get repeated numbers. If you only want non-repeating numbers, run through
the array and only unshift if the number is not in the array already.
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven, TuxPowera tale of death
;' in Tt to my '$TTT = shift;' and call Tt like this 'Tt($TTT)'.
You should *always* use, use strict;.
--
Flemming Greve SkovengaardThe killer's breed or the Demon's seed,
a.k.a Greven, TuxPowerThe glamour, the fortune, the pain,
[EMAIL PROTECTED] Go to war again
/(?!^)(?=[a-z])/ /gi;
# Insert two spaces where the next character is a letter (case insensitive)
# and the previous is *not* start of string
--
Flemming Greve SkovengaardThe prophecy of the holy Norns
a.k.a Greven, TuxPowerthe world is doomed to die
[EMAIL
), then
cd module_name
make
make test
make install
FOR WINDOWS:
You're on your own :)
--
Flemming Greve Skovengaard Just a few small tears between
a.k.a Greven, TuxPower Someone happy and one sad
[EMAIL PROTECTED] Just a thin line drawn between
4168.08 BogoMIPS
Greve SkovengaardThe killer's breed or the Demon's seed,
a.k.a Greven, TuxPowerThe glamour, the fortune, the pain,
[EMAIL PROTECTED] Go to war again, blood is freedom's stain,
4168.08 BogoMIPS Don't you pray for my soul anymore
to understand, very well written and covers all the basic Perl,
so it should get you started.
--
Flemming Greve Skovengaard Be it the Devil or be it him
a.k.a Greven, TuxPower You can count on just one thing
[EMAIL PROTECTED] When the time is up, you'll
the line:
my @file_list = /*.txt/
to
my @file_list = *.txt
or
my @file_list = glob *.txt
--
Flemming Greve Skovengaard FAITH, n.
a.k.a Greven, TuxPower Belief without evidence in what is told
[EMAIL PROTECTED] by one who speaks without knowledge,
4168.08
;
$name =~ s/[^A-Za-z]\w*//g; #change 1
$name =~ tr/A-Z/a-z/; #change 2
print Old = $org_name\n;
print New = $name\n;
__END__
--
Flemming Greve SkovengaardAnd when you kill a man, you're a murderer
a.k.a Greven, TuxPowerKill many, and you're a conqueror
[EMAIL
);
$times[$i] = $create_time;
$i++;
}
@sorted_times = sort(@times);
my $this_time;
foreach $this_time (@sorted_times) {
my($day, $mon, $dt, $tm, $yr) = split /\s+/,$this_time;
my ($hr, $mn, $sec) = split /:/, $tm;
print $this_time\n;
}
--
Flemming Greve Skovengaard Be it the Devil
regards,
Steve Hemond
Programmeur Analyste / Analyst Programmer
Smurfit-Stone, Ressources Forestieres
La Tuque, P.Q.
Tel.: (819) 676-8100 X2833
[EMAIL PROTECTED]
--
Flemming Greve SkovengaardAnd when you kill a man, you're a murderer
a.k.a Greven, TuxPowerKill many
[snip]
--
Flemming Greve SkovengaardThe killer's breed or the Demon's seed,
a.k.a Greven, TuxPowerThe glamour, the fortune, the pain,
[EMAIL PROTECTED] Go to war again, blood is freedom's stain,
4168.08 BogoMIPS Don't you pray for my
43 matches
Mail list logo