#Start test.pl
use strict;
# test.pl is saved in c:/work/temp
my $testDir = "c:/work/temp";
opendir(DIR, $testDir );
my $file = grep { /st.pl$/ } readdir(DIR);
closedir(DIR);
print "blah1: [[[" . $file ."]]]\n" ;
print "blah2: [[[" . "$file" ."]]]\n" ;
opendir(DIR, $t
Mike Blezien wrote:
> Hello,
Hello,
> is there a simple way to generate a list of numbers from 0 - 1000 in
> increments of 10 IE: 0, 10, 20, 30, 40. ...etc
>
> IE: foreach (0..1000)
>{
> # create increments of 10's
>}
for ( my $number = 0; $number <= 1_000; $number += 10 ) {
pr
On Wed, May 03, 2006 at 09:49:11PM -0500, JupiterHost.Net wrote:
>
> Its ok if its homework, then they will remain stupid for lack of effort
> and laziness will haunt their every clueless waking moments :)
>
> (say they interview for a job and they ask them to show their ability by
> doing a si
Mike Blezien wrote:
: is there a simple way to generate a list of numbers from
: 0 - 1000 in increments of 10 IE: 0, 10, 20, 30, 40. ...etc
yes, there sure is :) What have you tried so far that is not working?
I have a nice working example I'd love to share but we need to see what
you've alre
On Wed, May 03, 2006 at 08:51:37PM -0500, Charles K. Clarkson wrote:
> Mike Blezien wrote:
>
> : is there a simple way to generate a list of numbers from
> : 0 - 1000 in increments of 10 IE: 0, 10, 20, 30, 40. ...etc
>
> No offense intended, but is this a homework problem?
That's the impress
Mike Blezien wrote:
: is there a simple way to generate a list of numbers from
: 0 - 1000 in increments of 10 IE: 0, 10, 20, 30, 40. ...etc
No offense intended, but is this a homework problem?
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
--
To unsubscribe, e-mail:
Hello,
is there a simple way to generate a list of numbers from 0 - 1000 in increments
of 10 IE: 0, 10, 20, 30, 40. ...etc
IE: foreach (0..1000)
{
# create increments of 10's
}
TIA
Mike(mickalo)Blezien
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
-Original Message-
From: Charles K. Clarkson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 03, 2006 5:41 PM
To: 'Perl Beginners'
Subject: RE: has key/value pairs
Smith, Derek wrote:
: Excellent... thank you. Before sending the email question, I
: was trying to use split to get rid of th
On Wed, May 03, 2006 at 04:41:19PM -0500, Charles K. Clarkson wrote:
> Smith, Derek wrote:
>
> : Excellent... thank you. Before sending the email question, I
> : was trying to use split to get rid of that and could not get
> : it to work as I was using
> :
> :
> : For ()
> : If (/pattern/) {
>
Excellent... thank you. Before sending the email question, I was trying
to use split to get rid of that and could not get it to work as I was
using
For ()
If (/pattern/) {
split /\=/ ,$_ /;
$vg{$_}++
}
}
Why didn't this work?
a) its invalid code, there are ton of things that'd
Smith, Derek wrote:
: Excellent... thank you. Before sending the email question, I
: was trying to use split to get rid of that and could not get
: it to work as I was using
:
:
: For ()
: If (/pattern/) {
:split /\=/ ,$_ /;
:$vg{$_}++
: }
: }
:
:
: Why didn't this work?
Becau
-Original Message-
From: Charles K. Clarkson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 03, 2006 4:10 PM
To: 'Perl Beginners'
Subject: RE: has key/value pairs
Smith, Derek wrote:
: I need to create a hash with a key/value pair as text:nontext
: like so:
: savecrash as the key and 1
And why not post an example of your catch to illustrate it for the
benefit of the list?
Because I was busy and I knew you would do it ;-)
Hee hee, yeah true enough :)
But if you know "this exact block of HTML", how about:
my @strings = ( "string 1", "string 2", ... );
Because most likele
Smith, Derek wrote:
: I need to create a hash with a key/value pair as text:nontext
: like so:
: savecrash as the key and 1 as the value
:
: savecrash_dir as the key and /var/adm/crash as the value.
:
: for (;;) {
:
: if ( /(?i)savecrash=/ || /(?i)savecrash_dir=\W+\w+/ ) {
:
On Wednesday 03 May 2006 03:29 am, D. Bolliger wrote:
> tom arnall am Sonntag, 30. April 2006 22.57:
> [...]
>
> > OK, the above stuff is all good. And now I have another question. The
> > following code:
> >
> > #!/usr/bin/perl -w
> > use strict;
> > use Tie::Scalar;
> > use DB_Fil
I need to create a hash with a key/value pair as text:nontext like so:
savecrash as the key and 1 as the value
savecrash_dir as the key and /var/adm/crash as the value.
The output from each is giving 1 (true) but I need to have the values as
I stated above.
Here is my code and below that is t
On Wed, May 03, 2006 at 10:04:26AM -0500, JupiterHost.Net wrote:
> Paul Johnson wrote:
> >On Tue, May 02, 2006 at 04:43:34PM -0500, JupiterHost.Net wrote:
> >
> >>>Basically, right now I just need the HTML to Text output, like I
> >>>explained.
> >
> >>"I want to grab strings between the p tags i
Paul Johnson wrote:
On Tue, May 02, 2006 at 04:43:34PM -0500, JupiterHost.Net wrote:
Basically, right now I just need the HTML to Text output, like I explained.
"I want to grab strings between the p tags in this exact block of HTML"
to which I would reply:
my @strings = $html =~ m{(.*)}g
On Wed, May 03, 2006 at 09:17:21AM -0500, Rance Hall wrote:
> Assuming you had a script configuration variable that was used numerous
> places in your script, further assume that you have "use strict;" in
> your perl script.
>
> You could declare the variable "my" and pass that variable to any
Assuming you had a script configuration variable that was used numerous
places in your script, further assume that you have "use strict;" in
your perl script.
You could declare the variable "my" and pass that variable to any
subroutines that needed it with @_.
Or you could declare that varia
here i am created a tree using this Tk::Tree module
like this pogram
#!/pkg/qct/software/perl/bin/perl
use Tk;
use Tk::Tree;
my $mw = MainWindow->new(-title => 'HList');
my $tree = $mw->Tree->pack;
foreach (qw/orange
orange.red
orange.yellow
green
green.blue
green.yellow
purple
On Wed, 03 May 2006 10:16:05 +0200, luis wrote:
> Peter Scott wrote:
>>
>> use LWP::Debug qw(+conns);
>>
>
> Thank you, Peter. That would be great if I knew where to read the STDERR
> since I'm running my script from the command line in an out-of-the-box
> CentOS linux installation.[...]
>
>
tom arnall am Sonntag, 30. April 2006 22.57:
[...]
> OK, the above stuff is all good. and now i have another question. the
> following code:
>
> #!/usr/bin/perl -w
> use strict;
> use Tie::Scalar;
> use DB_File;
>
> my ($f,@f,%f);
>
> tie %f, "DB_File", "file.txt
Omega -1911:
> Dr.Ruud:
>> I prefer to filter out the author's email address from my follow-up,
>> if the message arrived via a list.
>> Unless the specific author requested otherwise (by any means,
>> probably including Mail-*-To headers), or the list doesn't work
>> reliably.
>> [cut that Omega
Peter Scott wrote:
On Tue, 02 May 2006 13:06:56 +0200, luis wrote:
the following code is part of a bigger script. I would like to know if
there is a way to print out or store into a file all the messages that
my script sends to the server, I mean, the full header and data parts
sent to the serv
On 5/2/06, Dr.Ruud <[EMAIL PROTECTED]> wrote:
(Randal L. Schwartz) schreef:
> If you want to do duplicate rejection, please note that every message
> contains a message-id that is unique per message. I reject
> duplicates via procmail. You can do the same.
I prefer to filter out the author's
And this will work also:
map {$tmp->{$_}->{text}} @sortedkeys
Karjala wrote:
Try this:
map {$_->{text}} @[EMAIL PROTECTED]
Ryan Perry wrote:
@[EMAIL PROTECTED]>{text}
I want to get all the "text" values for a set of keys in a hashref,
but the above code always gives me only the first in @s
27 matches
Mail list logo