> So I will posit the question to members of this list: What resource do you
> use when you need to learn about a feature of Tk?
In Tk we have the concept of widgets. Everything like canvas, menubar,
radio button, button, window is a widget. And fortunately many of them
have been given a quite
This request brings up a good point, though, in that we have this great
thing, namely tk, that can be a great shortcut to creating graphical
applications from the normally flexible but often spartan Perl, and there
doesn't seem to be a really good resource for learning or reference.
So I will p
The following has been taken from perldoc Tk::Canvas
TEXT ITEMS
A text item displays a string of characters on the screen in
one or more lines. Text items support indexing and
selection, along with the following text-related canvas
methods: dchars, focus, icursor, index, in
On Thursday, April 18, 2002, at 03:37 , Mark Anderson wrote:
>
No, you need ++ vs +1. As they say in perl, ++ is magical and will
do want you want. + 1 will not.
Wags ;) ps -- is not magical in the same sense as ++ either.
>>>
>>> How would you decrement a character then?
On Wednesday, April 17, 2002, at 09:24 , Jaimee Spencer wrote:
>
> #!/usr/bin/perl
> # list all of the perl modules installed
> use File::Find ;
> for (@INC) { find(\&modules,$_) ; }
>
> sub modules
> {
> if (-d && /^[a-z]/) { $File::Find::prune = 1 ; return }
> return unless /\.
I'm trying to develop a user interface for a program I've written - What
I need the program to do is print out the results of the current process
to the TK interface. I absolutely can not figure out how to do a simple
printing to TK function!@@!# For example, I would have a program that
does
>>> No, you need ++ vs +1. As they say in perl, ++ is magical and will
>>> do want you want. + 1 will not.
>>>
>>> Wags ;) ps -- is not magical in the same sense as ++ either.
>>
>> How would you decrement a character then? There surely has to be a
>> way?
>
>perldoc -f ord
>perldoc -f chr
>
On Thursday, April 18, 2002, at 02:27 , Ahmed Moustafa wrote:
> Chas,
>
> Thanks a lot!
>
>> #the main loop has exited, so we should check to see if there are
>> #any unreaped children
>> waitpid $_ for keys %running;
>
> My main loop is iterating forever i.e. a daemon; thus, any code after the
On Thursday, April 18, 2002, at 03:14 , Elias Assmann wrote:
> On Thu, 18 Apr 2002 [EMAIL PROTECTED] wrote:
>> No, you need ++ vs +1. As they say in perl, ++ is magical and will
>> do want you want. + 1 will not.
>>
>> Wags ;) ps -- is not magical in the same sense as ++ either.
>
> How w
On Thu, 18 Apr 2002 [EMAIL PROTECTED] wrote:
> No, you need ++ vs +1. As they say in perl, ++ is magical and will do want
>you want. + 1 will not.
>
> Wags ;) ps -- is not magical in the same sense as ++ either.
How would you decrement a character then? There surely has to be a
way?
Chas,
Thanks a lot!
> #the main loop has exited, so we should check to see if there are
> #any unreaped children
> waitpid $_ for keys %running;
My main loop is iterating forever i.e. a daemon; thus, any code after the
main loop will not be executed. So, what do you think?
Once again, thanks.
> a) not knowing what has already been done in Perl
> a la the CPAN
A lot of my early work would have been spared if I knew that CPAN had
EVERYTHING close to perfect that I wrote badly.
>
> b) other alternatives that exist in other open source solutions
Eh... I let
volks,
One of the question sets that I really wonder about at times
reviewing some of the questions that come up here is how
much of what folks are working on is due to
a) not knowing what has already been done in Perl
a la the CPAN
b) other alternatives that ex
http://turtle.ee.ncku.edu.tw/openwebmail/
This is by far the best one that I have seen, and it is even written in
Perl!
-James
-Original Message-
From: Anthony E. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 12:36 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: th
Allison Ogle wrote:
>
> Maybe it is because I am assigning my array to a line from another document
> and not assigning letters dirtectly to the array because it still doesn't
> work. It could be there is something wrong with my code too.
>
> $word=; #where is the filehandle and therefore $wo
> I'm looking for an open source web-based email package
> that will allow me to offer visitors free web-based
> email accounts (However, I don't want to have to setup
> system user accounts - as this would be a huge
> security risk).
Two PHP based solutions:
www.squirrelmail.org
www.horde.org/i
On Wednesday, April 17, 2002, at 02:09 , richard noel fell wrote:
> sub create_menu_bar
> {
> my $mb = $MW->Menu();
> $MW->configure(-menu=>$mb);
> opendir DIR, "./" or die " cannot open current directory: $!";
> my $current_directory = cwd;
>my @directories = grep { !/^\.\
Hello,
I'm looking for an open source web-based email package
that will allow me to offer visitors free web-based
email accounts (However, I don't want to have to setup
system user accounts - as this would be a huge
security risk).
Any info/help is appreciated!
=
Anthony Ettinger
[EMAIL PRO
Hello
Try, from the command line rm ./ name_ of_ directory
-Original Message-
From: Leon, Yanet I,,DMDCWEST [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 12:03 PM
To: [EMAIL PROTECTED]
Subject: Funny character on a dir name.
Not necessarily a perl question. One of th
On Thu, 2002-04-18 at 15:03, Leon, Yanet I,,DMDCWEST wrote:
> Not necessarily a perl question. One of the users (on a Unix box) created a
> directory with a dash at the beginning of the name (no idea how he did it)
> and he needs to remove it. The name of the file is -testing is there a way
> to
> -Original Message-
> From: Leon, Yanet I,,DMDCWEST [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 18, 2002 3:03 PM
> To: [EMAIL PROTECTED]
> Subject: Funny character on a dir name.
>
>
> Not necessarily a perl question. One of the users (on a Unix
> box) created a
> directory wit
> "Yanet" == Yanet Leon, <[EMAIL PROTECTED]> writes:
Yanet> Not necessarily a perl question. One of the users (on a Unix
Yanet> box) created a directory with a dash at the beginning of the
Yanet> name (no idea how he did it) and he needs to remove it. The
Yanet> name of the
Not necessarily a perl question. One of the users (on a Unix box) created a
directory with a dash at the beginning of the name (no idea how he did it)
and he needs to remove it. The name of the file is -testing is there a way
to remove it using perl or other means. I removed it using the inode
On Thursday, April 18, 2002, at 11:21 , Felix Geerinckx wrote:
[..]
> Personally, however, I prefer an explicit 'return' statement, as in
>
> return map { ($_ => 1) }, @array;
>
> (The () are optional).
[..]
Ok, I can go there... so my test code shows me
[jeeves:~/tmp/perl/misc] drieux% p
Hi guys
I managed to resolve the issue regarding the previous issue.
First problem -
$rows_processed = "rows_processed";
should be :
$rows_processed = "rows processed";
After the first WHILE loop, I added a close and open (in this order) of
SUMMARYTMP and it worked.
Thanks again for the help.
To
on Thu, 18 Apr 2002 18:07:38 GMT, Drieux wrote:
> hence
>
> map {[ 'cascade', '~'.$_]} @sub_directories;
>
> as the last line of the sub should have returned a 'list'
> back to the caller just as the
>
> sub foo { qw/ 1 2 3 4 5 6 7 8 9 / } ;
>
> would return a 'list' ???
Yes
>
>
> How can I read a string 5 - 4 and get 1?
Hallucinations may cause such strange errors.
If the string is really "5 - 4", and you get
"1" then your grey matter has failed. I
suggest updating to a more reliable version ;)
Oh, hang on... I know what you are talking
about now! You want to evaluat
Hi Bob,
I am having trouble writing another new format into the same file as the one
I mentioned in the previous email.
I executed the following code and it prints out the SUMMARY format but NOT
the SUMMARY1 format into the same file.
Any ideas ?
Thanks in advance
Tony
The code is as follows :
Adding one and incrementing are different. You're adding 1. Did you try
incrementing the character?
Instead of this:
$code[$y]=$code[$y]+1;
try
($code[$y])++;
#!/usr/bin/perl
@code = qw( A B C D );
$y = 0;
if( $code[$y] ne "F" ){
print "$code[$y]\n";
($code[$y])++;
print "$code[$y]\n"
You are right, $code[$y]=$code[$y]++; shouldn't work, since it increments
after the assignment.
$code[$y]++; works for me, as does $code[$y]=++$code[$y];
This code:
@code = split //,"ABCD";
#values stored in @code are now A B C D
$y=0;
if($code[$y] ne "F"){
print "$code[$y]\n";
$c
On Thursday, April 18, 2002, at 06:05 , Felix Geerinckx wrote:
> on Thu, 18 Apr 2002 12:56:43 GMT, [EMAIL PROTECTED] (Richard Noel Fell)
> wrote:
>
>> However, I do not understand your
>> comments about the return value of map. Does not map return a
>> reference to an anonymous arrar, not a hash
No, you need ++ vs +1. As they say in perl, ++ is magical and will do want
you want. + 1 will not.
Wags ;) ps -- is not magical in the same sense as ++ either.
-Original Message-
From: Allison Ogle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 10:58
To: a a
Subject:
Hi
How can I read a string 5 - 4 and get 1?
thanks
Pierre
_
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAI
Maybe it is because I am assigning my array to a line from another document
and not assigning letters dirtectly to the array because it still doesn't
work. It could be there is something wrong with my code too.
$word=; #where is the filehandle and therefore $word gets the
string from the inpu
On Thu, 2002-04-18 at 13:22, drieux wrote:
> So my summary seems to be:
>
> Neat idea - may get cleaned up in perl6
> back in line behind my Seth and not to go there
That is pretty much the long and short of it. I wouldn't recommend
using prototypes unless you meet these three
Hi folks,
Anyone know where to get hold of the module Win32API::Time ?? It's listed
on ASPN but doesn't seem to be available through ppm or the obvious download
lists.
If there are any other suggestions for setting the system clock via a perl
script I would be greatful.
Thanks,
Craig :)
--
On Thursday, April 18, 2002, at 07:54 , Chas Owens wrote:
[..]
p0: thanks for the clarification on the @_; since my coding
with that - like my habits with subs in general is based not
upon any sense of 'understanding or knowledge' - but based
solely upon
a) ripped that off from someone
> On Thursday, April 18, 2002, at 09:04 , Allison Ogle wrote:
>
>> Hi,
>>
>> I have an array which contains letters. I need to increment these
>> letters
>> in the array one at a time. For example going from B to C. I was trying
>> something like
>>
>> $array[$x]++;
>
> did you check that yo
Oh, wait. I misread that.
Are you sure the array contains letters? Usually an array will return 1 for
an increment when the previous value was '', 0, or undef.
-Original Message-
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 9:15 AM
To: 'Allison Ogle';
Are you looking for something like this?
$array[$x++]; #Moves to the next element in the array
-Original Message-
From: Allison Ogle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 9:05 AM
To: a a
Subject: Incrementing the letters in an array
Hi,
I have an array which cont
This works:
use warnings;
use strict;
my @letters = qw( A B C D );
for (my $n = 0; $n < 4; $n++){
$letters[$n]++;
}
print "@letters\n";
> -Original Message-
> From: Allison Ogle [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 18, 2002 12:05 PM
> To: a a
>
Must be missing something. Here is simple code and increments the current
letter the next:
my $x = 'E';
$x++;
my @array = ();
$array[0] = 'G';
$array[0]++;
printf "%-s %-s\n", $x, $array[0];
Output:
F H
Wags ;)
-Original Message-
From: Allison Ogle [mailto:[EMAIL PROTECTED]
Hi,
I have an array which contains letters. I need to increment these letters
in the array one at a time. For example going from B to C. I was trying
something like
$array[$x]++;
however that increments the letter to the number 1. Does anyone have any
ideas? Thanks in advance.
Allison
-
Play with it. The more you play the better you will get, (just not too much
or you'll go blind).
Good books are:
Perl by Example (the Example books are an excellent place to START)
Perl in a Nutshell
Also it takes time. You will not learn everything in 24 hours like some
books advertise.
On Thursday, April 18, 2002, at 05:35 , Anthony Beaman wrote:
[..]
> I then try to study code but it's usually beyond me.
[..]
always remember
perldoc -m
will let you skim through the module completely - POD/Code/Comments.
the three responses I have seen from Felix, Jonathan and Jen
On Wed, 2002-04-17 at 20:25, drieux wrote:
>
> I just found this in the perldoc
>
> " Currently Perl subroutines have fairly limited
> support for formal parameter lists. You can specify the
> number of parameters and their type, but you still have to
> manually take them
On Wed, 2002-04-17 at 19:06, Ahmed Moustafa wrote:
> > You are better off trying
> >
> > $SIG{CHLD} = 'IGNORE';
> >
> > at the top of your program and seeing if zombies are left out there. If
> > so then you might want to use pop or shift like this
> >
> > waitpid shift @children while @children;
> But, the script below does not work. I get an error message :
> Not an ARRAY reference at
> /usr/local/ActivePerl-5.6/lib/site_perl/5.6.1/i686-linux-threa
> d-multi/Tk/Menu.pm
> line 69. The cause of this is the subroutine sub_menu. As I
> understand things, the argument to -menuitems must b
$d = 'test1,test2,test3,test4';
@data = split(/,/, $d);
print $data[1];
-Original Message-
From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 9:54 PM
To: [EMAIL PROTECTED]
Subject: Perl simple array
Hey All,
Just wondering why the following code won't p
on Thu, 18 Apr 2002 14:09:57 GMT, [EMAIL PROTECTED] (Gary
Stainburn) wrote:
> While your answer makes sense, why doesn't shift use the $_ as I
> obviously expected?
If you
perldoc perlvar
and look for the description of '$_', you will see where it is 'assumed'.
To complicate
on Thu, 18 Apr 2002 13:01:39 GMT, [EMAIL PROTECTED] (Jonathan e.
paton) wrote:
> Studying other peoples Perl code is probably a Bad Thing,
> since Perl doesn't enforce any style, design, efficency
> or robustness on the programmer.
> [...]
> Not in my opinion. As above, many perl scripts availa
On Thursday 18 April 2002 1:52 pm, Felix Geerinckx wrote:
> on Thu, 18 Apr 2002 13:26:21 GMT, [EMAIL PROTECTED] (Gary
>
> Stainburn) wrote:
> > [..]
> > while this one, using $_ instead of $line fails stating once per line
> > before the break that I'm using an uninitialised variable on the
> > 'w
Felix -
Thanks for the very clear explanation.
Dick
Felix Geerinckx wrote:
>
> on Thu, 18 Apr 2002 12:56:43 GMT, [EMAIL PROTECTED] (Richard Noel Fell)
> wrote:
>
> > However, I do not understand your
> > comments about the return value of map. Does not map return a
> > reference to
on Thu, 18 Apr 2002 12:56:43 GMT, [EMAIL PROTECTED] (Richard Noel Fell)
wrote:
> However, I do not understand your
> comments about the return value of map. Does not map return a
> reference to an anonymous arrar, not a hash?
'map' returns a *list*. This list can be coerced into an array or int
> How's the best way to get the most out of studying and
> studying source code? I'm always reading that looking
> at source code (and coding in general) is the best way
> to learn to program.
The best way is to join a programming project, and learn
the required aspects of the language you need
From: "Anthony Beaman" <[EMAIL PROTECTED]>
> How's the best way to get the most out of studying and studying source
> code? I'm always reading that looking at source code (and coding in
> general) is the best way to learn to program.
You should not just look at the code. You should play with it.
on Thu, 18 Apr 2002 13:26:21 GMT, [EMAIL PROTECTED] (Gary
Stainburn) wrote:
> [..]
> while this one, using $_ instead of $line fails stating once per line
> before the break that I'm using an uninitialised variable on the
> 'while' line
>
> __BEGIN__
> print while (shift @HTML)!~/^
Drieux -
Thanks for your reply. Your suggestion for the use of foreach makes
sense and as been implemented. However, I do not understand your
comments about the return value of map. Does not map return a reference
to an anonymous arrar, not a hash?
Dick Fell
Drieux wrote:
>
> On Wednesda
How's the best way to get the most out of studying and studying source code? I'm
always reading that looking at source code (and coding in general) is the best way to
learn to program. I'm taking stuff of the net and going through it and trying to make
sure I can "read" it and trying to see wha
Hi all,
I've got a script that read in a HTML template file to an array, and then
write it out a number of times substituting part of the text.
Can anyone tell me why the following code fragment works
__BEGIN__
my $line='';
print $line while ($line=shift @HTML)!~/^/; # skip to end of comment
p
http://www.packetfactory.net/Projects/Firewalk/
>
> Anyone know of a perl script that can determine if a website
> is actually
> behind a firewall?
>
> thanks!
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubsc
> "drieux" == drieux <[EMAIL PROTECTED]> writes:
drieux> "Currently Perl subroutines have fairly limited support for
drieux> formal parameter lists. You can specify the number of
drieux> parameters and their type, but you still have to manually
drieux> take them out of the `@
Hi
I am trying to parse a string of text from a sudoers file, what I am trying
to get out is the HOSTCLUSTER name and the hosts.
Host_Alias HOSTCLUSTER = host1, host2, \
host3, host4, \
host5, host6
The first problem is I s
hi john
i implementet your solution. mine actually did work, but yours seemed more logical.
it works nicely.
thank you
martin
On Wed, Apr 17, 2002 at 12:58:07PM -0700, John W. Krahn wrote:
> [EMAIL PROTECTED] wrote:
> >
> > hi,
>
> Hello,
>
> > im pasting some more of the lines i need to p
hmmm
we'llyou can't tell anything from port 80 (http) coz (by the sounds of
things) the firewall is configured to let that traffic thru (probably).
now, you could sniff to see what other connections you can make (21 etc)
but, if you make a connection or get some sorta reading back on a p
65 matches
Mail list logo