Re: question about stream data and tk

2020-12-09 Thread WILLIAM & ERIKA MARTINEZ
Good morning I am retired, no longer programming. Please remove my name/email address from your database/emailing list. Thank you will > On 12/09/2020 5:52 AM stefano cerbioni wrote: > > > hi guys i have a question > is possible insert in listbox a TCP ipStream ? Does

Re: question about stream data and tk

2020-12-09 Thread Mike
I'm thinking that is not easy - maybe not possible. I hope you prove me wrong. Mike On 12/9/20 6:52 AM, stefano cerbioni wrote: hi guys  i have  a question is  possible insert in listbox a TCP ipStream ? Does anyone  have some examples about it ?? because I don't know where to start thank

Re: question about change text in frame

2020-12-01 Thread Shlomi Fish
Hi Stefano! On Sun, 29 Nov 2020 18:49:13 +0100 stefano cerbioni wrote: > Hi guys i find in internet but nothing , how is possible change a text > inside a frame ?? > > example i have this frame > Please go over these documents: * https://github.com/shlomif/how-to-share-code-online * http

Re: question about change text in frame

2020-11-29 Thread sisyphus
On Mon, Nov 30, 2020 at 5:08 AM Andrew Solomon wrote: > Hi Stefano, > > From a Google search on "LabFrame" I assume that you're using this module? > > https://metacpan.org/pod/distribution/Tk/pod/LabFrame.pod > and also this (undocumented) module > https://metacpan.org/source/SREZIC/Tk-804.035/Tk

Re: question about change text in frame

2020-11-29 Thread Andrew Solomon
Hi Stefano, >From a Google search on "LabFrame" I assume that you're using this module? https://metacpan.org/pod/distribution/Tk/pod/LabFrame.pod and also this (undocumented) module https://metacpan.org/source/SREZIC/Tk-804.035/Tk/LabEntry.pm If that's the case you might want to try contacting S

Re: question about perl script

2019-10-30 Thread John W. Krahn
On 2019-10-29 7:48 p.m., 刘东 wrote: Dear every one: Hello. I try to write a perl script to delet the content of file carp01_1_both.txt as same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file carp

Re: question about perl script

2019-10-30 Thread Rob Coops
This should do: #!/usr/bin/perl use strict; use warnings; open my $a, '<:encoding(UTF-8)', 'a' or die "Unable to open a: $!"; open my $b, '<:encoding(UTF-8)', 'b' or die "Unable to open b: $!"; my %pair = (); while ( my $line = <$a> ) { my @line = split(" ", $line); $pair{$line[0]} = 1; }

Re: question about perl script

2019-10-29 Thread Uri Guttman
On 10/29/19 10:48 PM, 刘东 wrote: Dear every one: I try to write a perl script to delet the content of file carp01_1_both.txt as same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file carp01_1_both.txt

Re: Question re remove_tree and symlinks

2019-08-24 Thread David Precious
On Fri, 23 Aug 2019 19:13:15 +0100 Mike Martin wrote: > Am I right in believing that remove_tree from File::Path does not > follow symlinks, ie: does not remove the linked file only the link if > there are links in the direstories removed An obvious way to find out would be to just try it - set

Re: Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Neil Hainer
I agree about starting with Learning Perl. It so happens that a new edition is about to become available. The following URL is from The Learning Perl website: https://www.learning-perl.com/2016/08/pre-order-learning-perl-7th-edition/ On Thu, Sep 1, 2016 at 1:03 PM, Hao Wu wrote: > https://w

Re: Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Илья Рассадин
Hi! For introduction to Modern Perl practicies, read Modern Perl by chromatic http://modernperlbooks.com/books/modern_perl_2016/index.html 01.09.16 19:52, Walker, Michael E пишет: Hi, even though _Beginning Perl_ dates back to 2000, is it still relevant for learning today? I wondered, becau

Re: Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Hao Wu
https://www.amazon.com/Beginning-Perl-Curtis-Poe/dp/1118013840 This one is more relevant. I read it and it is very good. However, If you never programming before Learning Perl probably is better to start with. On Thu, Sep 1, 2016 at 9:52 AM, Walker, Michael E < michael.e.walk...@boeing.com> wr

Re: question of what can respond to die [...]

2015-01-28 Thread Harry Putnam
Brandon McCaig writes: [...] snipped excellent extrapolation > I hope that helps. Well, I could not have asked for a fuller answer... thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: question of what can respond to die [...]

2015-01-28 Thread Harry Putnam
Shawn H Corey writes: > On Tue, 27 Jan 2015 09:37:15 -0500 > Harry Putnam wrote: > >> #!/usr/local/src/test/bin/perl >> >> use strict; >> use warnings; >> use Cwd 'abs_path'; >> >> my $tdir = shift; >> > > You can use `-e` to determine if the path exists and `-d` to determine > if it's a dire

Re: question of what can respond to die [...]

2015-01-27 Thread Shawn H Corey
On Tue, 27 Jan 2015 09:37:15 -0500 Harry Putnam wrote: > #!/usr/local/src/test/bin/perl > > use strict; > use warnings; > use Cwd 'abs_path'; > > my $tdir = shift; > You can use `-e` to determine if the path exists and `-d` to determine if it's a directory. See `perldoc -f -X` and search for

Re: question of what can respond to die [...]

2015-01-27 Thread Shawn H Corey
On Tue, 27 Jan 2015 10:48:43 -0500 Brandon McCaig wrote: > It would not be very pleasant if most things die() on error because > errors are normal and usually we don't want robust programs to crash > when something innocent fails, nor do we want to have to wrap every > error that we can recover f

Re: question of what can respond to die [...]

2015-01-27 Thread Brandon McCaig
Harry: On Tue, Jan 27, 2015 at 9:37 AM, Harry Putnam wrote: > In the following code I hoped to use `use Cwd abs_path;' to not > only produce the absolute path for a named directory but to die if it > could not... thereby getting around having to test the named dir with > -d ... to make sure it w

Re: question on escaping shell command

2014-05-16 Thread Chris Knipe
Thanks for all the suggestions and replies guys. After further investigation, it seems the bug is rather in the shell program itself. Even if reading the values from a text file instead of STDIN, it still refuses to parse anything beyond a # character. I've altered my code to use Authen::Radius

Re: question on escaping shell command

2014-05-16 Thread Simon Foutaiz
You can take a look at the IPC::Cmd module that should remove some pain when dealing with system commands through Perl. https://metacpan.org/pod/IPC::Cmd On Thu, May 15, 2014 at 3:10 PM, Chris Knipe wrote: > Hi All, > > I'm having a bit of a strange issue executing a system command through >

Re: question on escaping shell command

2014-05-15 Thread Robert Wohlfarth
On Thu, May 15, 2014 at 3:10 AM, Chris Knipe wrote: > I'm having a bit of a strange issue executing a system command through > perl. > The system command reads a bunch of parameters through STDIN, and responds > via STDOUT. The problem is that special commands (notably the "#" and "!" > characte

Re: question about perl 6 sigils

2013-09-29 Thread Peter Scott
On Tue, 24 Sep 2013 18:48:40 +0200, Luca Ferrari wrote: > I read both the book and the exegenis, it is only that it requires me to > think about the correct usage of sigils because it is not as much > intuitive for me as it is in v5. > I was just trying to explain to my brain why having immutable s

Re: question about perl 6 sigils

2013-09-24 Thread Octavian Rasnita
From: Andy Bach On Tue, Sep 24, 2013 at 10:44 AM, Shawn H Corey wrote: There is also a third group who want to get rid of sigils entirely. ;) Ahhh! Blasphemy, Blasphemer! That way lies chaos! Dogs and cats, living together! NEVER! ... And I was going to add that there is a four

Re: question about perl 6 sigils

2013-09-24 Thread Luca Ferrari
On Tue, Sep 24, 2013 at 5:27 PM, Andy Bach wrote: > Did you read the exegesis? Damian is one of the smartest guys you'll ever > hear speak (his book "Perl Best Practices", for one, is worth it's weight in > classrooms - er, something like that). It's not that you're wrong or that > the argument

Re: question about perl 6 sigils

2013-09-24 Thread Andy Bach
On Tue, Sep 24, 2013 at 10:44 AM, Shawn H Corey wrote: > > There is also a third group who want to get rid of sigils entirely. ;) > Ahhh! Blasphemy, Blasphemer! That way lies chaos! Dogs and cats, living together! NEVER! Er, sorry. As the exegesis are deprecated (though still worth the reads jus

Re: question about perl 6 sigils

2013-09-24 Thread Shawn H Corey
On Tue, 24 Sep 2013 10:27:24 -0500 Andy Bach wrote: > Did you read the exegesis? Damian is one of the smartest guys you'll > ever hear speak (his book "Perl Best Practices", for one, is worth > it's weight in classrooms - er, something like that). Perl::Critic and its script, perlcritic, follow

Re: question about perl 6 sigils

2013-09-24 Thread Andy Bach
On Tue, Sep 24, 2013 at 3:43 AM, Luca Ferrari wrote: > What I don't understand here is why we have to keep the true > sigil for any access. > Did you read the exegesis? Damian is one of the smartest guys you'll ever hear speak (his book "Perl Best Practices", for one, is worth it's weight in cla

Re: question about perl 6 sigils

2013-09-24 Thread Luca Ferrari
On Tue, Sep 24, 2013 at 12:52 AM, Andy Bach wrote: > I liked it, after I > understood it. I posted the question for the same reason: I believe that having the sigil meaning what you (are thinking) you are accessing was a great idea. What I don't understand here is why we have to keep the true sig

Re: question about perl 6 sigils

2013-09-23 Thread Andy Bach
On Mon, Sep 23, 2013 at 10:17 AM, Luca Ferrari wrote: > It's just one of those things. When Perl was invented, Larry Wall liked the idea of make the sigil mean something and mutate when the access did. Most other languages (that had sigils) didn't do that. Some people said "genius" some people we

Re: Question regarding while loops for reading files

2013-02-14 Thread Tiago Hori
Hi Jim, Thanks again. Very helpful as usual! T. On 2013-02-13, at 11:37 PM, Jim Gibson wrote: > > On Feb 13, 2013, at 6:47 PM, Tiago Hori wrote: > >> Hey Guys, >> >> I am still at the same place. I am writing these little pieces of code to >> try to learn the language better, so any advice

Re: Question regarding while loops for reading files

2013-02-14 Thread Tiago Hori
Hi John, Thanks. What I was trying to do there was to test if there was any numbers in the the first element of the first line. That was intended to get rid of the header line. I meant to use [0-9]* as character class to say "if there aren't any number of integers in the first element, next".

Re: Question regarding while loops for reading files

2013-02-13 Thread Jim Gibson
On Feb 13, 2013, at 6:47 PM, Tiago Hori wrote: > Hey Guys, > > I am still at the same place. I am writing these little pieces of code to > try to learn the language better, so any advice would be useful. I am again > parsing through tab delimited files and now trying to find fish from on id > (i

Re: question of regexp or (another solution)

2012-12-15 Thread Dr.Ruud
On 2012-12-15 06:13, timothy adigun wrote: Using Dr., Ruud's data. This is another way of doing it: [solution using a hash] Realize that with keys(), the input order is not preserved. Another difference is that when a key comes back later, the hash solution will collide those, which is eithe

Re: question of regexp or (another solution)

2012-12-14 Thread *Shaji Kalidasan*
desseaux Cc: beginners@perl.org Sent: Saturday, 15 December 2012 10:43 AM Subject: Re: question of regexp or (another solution) Hi, On Fri, Dec 14, 2012 at 2:53 PM, samuel desseaux wrote: > Hi! > > I work in a library and i need to have several fields in one line > > E

Re: question of regexp or (another solution)

2012-12-14 Thread timothy adigun
Hi, On Fri, Dec 14, 2012 at 2:53 PM, samuel desseaux wrote: > Hi! > > I work in a library and i need to have several fields in one line > > Example > > I have this > > =995 \\$xPR$wLivre > =995 \\$bECAM$cECAM > =995 \\$n > =995 \\$oDisponible > =995 \\$kG1 42171 > > > and i want in one line >

Re: question of regexp or (another solution)

2012-12-14 Thread Dr.Ruud
On 2012-12-14 14:54, samuel desseaux wrote: =995 \\$xPR$wLivre =995 \\$bECAM$cECAM =995 \\$n =995 \\$oDisponible =995 \\$kG1 42171 and i want in one line =995 \\$bECAM$cECAM$kG1 42171$n$oDisponible$xPR$wLivre echo -n '1 a 1 b 1 c 2 x =995 \\$xPR$wLivre =995 \\$bECAM$cECAM =995 \\$n

Re: question of regexp or (another solution)

2012-12-14 Thread samuel desseaux
i complete my email Hi! I work in a library and i need to have several fields in one line Example I have this =995 \\$xPR$wLivre =995 \\$bECAM$cECAM =995 \\$n =995 \\$oDisponible =995 \\$kG1 42171 and i want in one line =995 \\$bECAM$cECAM$kG1 42171$n$oDisponible$xPR$wLivre How could i

Re: Question on the function - hex

2012-04-12 Thread Uri Guttman
On 04/12/2012 04:43 PM, Shawn H Corey wrote: On 12-04-12 04:34 PM, Parag Kalra wrote: Why does the output of perl -e "print hex '0x160402'" differs from the output of perl -e "print hex 0x160402" EG: bash-3.2$ perl -e "print hex '0x160402'" 94489281538 $ perl -e "print

Re: Question on the function - hex

2012-04-12 Thread Shawn H Corey
On 12-04-12 04:34 PM, Parag Kalra wrote: Why does the output of perl -e "print hex '0x160402'" differs from the output of perl -e "print hex 0x160402" EG: bash-3.2$ perl -e "print hex '0x160402'" 94489281538 $ perl -e "print hex 0x160402" 10189963531576 $ per

Re: [question] array

2012-03-30 Thread Dr.Ruud
On 2012-03-30 12:33, Eko Budiharto wrote: I would like to ask about 2 dimensional array Each element of a Perl array is a scalar. my @colors = ( "red", "white", "blue" ); which can also be written as: my @colors = qw( red white blue ); and can be used as: print "ok" if $colors[ 2

RE: [question] array

2012-03-30 Thread Ken Slater
> -Original Message- > From: Eko Budiharto [mailto:eko.budiha...@gmail.com] > Sent: Friday, March 30, 2012 6:33 AM > To: beginners@perl.org > Subject: [question] array > > hi list, > I would like to ask about 2 dimensional array > > my code: > my $ref = $sth->fetchall_arrayref(); > foreac

Re: Question regarding file stat setgid determination.

2011-10-31 Thread Igor Dovgiy
Hi Daniel, There's no such thing as boolean literals [true/false] in Perl. ) Remember these weird '1's at the end of .pm files? ) Or constructs like while(1)? ) And frankly speaking, I don't think there's a big need for these literals. Every value (scalar or list, doesn't matter) can be well and

Re: Question regarding file stat setgid determination.

2011-10-29 Thread Anneli Cuss
Two comments: 02000 is 1024 in base 8; the leading 0 indicates octal much as leading 0x indicates hex. $a & $b returns the number with bits in common, so we expect 1024 & 1024 to equal 1024 (or 02000 & 02755, the latter being a realistic file mode; note these are in octal). This will be true in b

Re: Question/Problem with foreach loop

2011-06-07 Thread CM Analyst
Gents, Sorry for my delayed response. Thank you for your suggestions. Based on your feedback, I made the following changes, and the hook is now working as expected. Thanks a million! my $taskstate = $taskEntity->GetFieldValue(state)->GetValue();     $session->OutputDebugString ("Task's state

Re: Question/Problem with foreach loop

2011-05-18 Thread Uri Guttman
> "CA" == CM Analyst writes: CA> my $taskEntity = $session->GetEntity ('almtask', $_); that gets a perl object in $taskEntity. CA> $taskEntity->GetFieldValue(state)->GetValue(); where is the value being assigned to? $taskEntity is not being modified or set in that line of code. it is j

Re: Question/Problem with foreach loop

2011-05-18 Thread Jim Gibson
On 5/18/11 Wed May 18, 2011 5:06 PM, "CM Analyst" scribbled: > Hi, > > In this code, the intent is to iterate through the tasks and modify the ID > field. The Task record (entity) should not be modified if it's state equals > "Completed". > > When I run this routine, there are two problems:

Re: Question regarding XML::Twig and parsing subelements of an XML-Tree

2011-04-16 Thread Werner
Hi, that did the trick: @directors = $elt->first_child('DIRECTOR_LIST')->children_text('DIRECTOR'); now, every director is listet in @directors-array =) Bye, Werner -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.

Re: Question regarding XML::Twig and parsing subelements of an XML-Tree

2011-04-16 Thread Werner
Hi, # something like the following also doesn't work :( @directors = $elt->first_child('DIRECTOR_LIST')->children('DIRECTOR'); i get the following error: "Can't call method "first_child" on an undefined value at test.pl line 53." regards, Werner -- To unsubscribe, e-mail: beginners-unsubscr..

Re: Question on Unless and Until

2010-09-01 Thread Paul Johnson
On Wed, Sep 01, 2010 at 01:00:21PM -0400, Brandon McCaig wrote: > On an unrelated note, what is correct quoting etiquette when you only > want to quote part of a line? This is how I do it: > Above, I just reformatted the quote onto > a single line beginning at the s

Re: Question on Unless and Until

2010-09-01 Thread Brandon McCaig
On Wed, Sep 1, 2010 at 12:12 PM, Shawn H Corey wrote: > Of course, if you want to make the purists cringe: > > if( some_condition ){ >  # this space intentionally left blank > }else{ >  do_work(); > } I actually have at least one colleague that does that (not at "Castopulence"[1], but at my real

Re: Question on Unless and Until

2010-09-01 Thread Chas. Owens
On Wed, Sep 1, 2010 at 12:12, Shawn H Corey wrote: > On 10-09-01 11:37 AM, Chas. Owens wrote: >> >> I don't care if you use unless or if, but please don't use if (!). >> Say if (not) instead.  The looser binding makes it easier to use and >> the fact that it is three letters long (rather than one

Re: Question on Unless and Until

2010-09-01 Thread Shawn H Corey
On 10-09-01 11:37 AM, Chas. Owens wrote: I don't care if you use unless or if, but please don't use if (!). Say if (not) instead. The looser binding makes it easier to use and the fact that it is three letters long (rather than one skinny character long) makes it some much easier to see. You d

Re: Question on Unless and Until

2010-09-01 Thread Chas. Owens
On Wed, Sep 1, 2010 at 11:12, Shlomi Fish wrote: > On Wednesday 01 September 2010 18:06:37 Brandon McCaig wrote: >> On Mon, Aug 30, 2010 at 2:25 AM, Uri Guttman wrote: >> > but i never use until anyhow. i use unless a fair amount as i don't like >> > if ( ! EXPR). my current boss has asked me to

Re: Question on Unless and Until

2010-09-01 Thread Chas. Owens
On Wed, Sep 1, 2010 at 11:06, Brandon McCaig wrote: > On Mon, Aug 30, 2010 at 2:25 AM, Uri Guttman wrote: >> but i never use until anyhow. i use unless a fair amount as i don't like >> if ( ! EXPR). my current boss has asked me to stop using unless but i am >> not stopping. > > It seems silly to

Re: Question on Unless and Until

2010-09-01 Thread Shlomi Fish
On Wednesday 01 September 2010 18:06:37 Brandon McCaig wrote: > On Mon, Aug 30, 2010 at 2:25 AM, Uri Guttman wrote: > > but i never use until anyhow. i use unless a fair amount as i don't like > > if ( ! EXPR). my current boss has asked me to stop using unless but i am > > not stopping. > > It se

Re: Question on Unless and Until

2010-09-01 Thread Brandon McCaig
On Mon, Aug 30, 2010 at 2:25 AM, Uri Guttman wrote: > but i never use until anyhow. i use unless a fair amount as i don't like > if ( ! EXPR). my current boss has asked me to stop using unless but i am > not stopping. It seems silly to use unless, but never use until. :) I think both make the cod

Re: Question on Unless and Until

2010-08-29 Thread Uri Guttman
> "JG" == Jim Gibson writes: JG> The unless construct above is correct. The 'until' construct is JG> not. 'until' can only occur at the end of a block preceded by 'do' or JG> at the end of a statement as a modifier. JG> do { JG> ... JG> } until( condition ); until is just

Re: Question on Unless and Until

2010-08-29 Thread Jatin Davey
Thanks Jim I got the understanding from this sample code as well: #!/usr/bin/perl use warnings; use strict; print "Enter your age : "; unless ((my $age = ) < 18) { print "you can vote \n"; } Thanks Jatin On 8/30/2010 11:15 AM, Jim Gibson wrote: At 9:53 AM +0530 8/30/10, Jatin Davey wrote:

Re: Question on Unless and Until

2010-08-29 Thread Jim Gibson
At 9:53 AM +0530 8/30/10, Jatin Davey wrote: Hi All I a newbie to perl. Reading through some of its basics on if constructs , while constructs and so i also found a the unless and until constructs. let me take the if construct , basically it is like this : if () { .} now in the above

Re: Question about match behaviour

2010-08-05 Thread Mike Martin
On 5 August 2010 03:39, John W. Krahn wrote: > Mike Martin wrote: >> >> Hi > > Hello, > >> I have the following code >> my $type='val'; >> my $type_g; >> foreach my $key (keys %options){ >> my $chk=$options{$key}->[3]; >> $type_g=$options{$key}->[4] if $chk=~/$type/; >> #$type_g=$options{$key}->[4

Re: Question about match behaviour

2010-08-05 Thread Mike Martin
- Show quoted text - On 5 August 2010 04:58, Chas. Owens wrote: > On Wed, Aug 4, 2010 at 11:36, Mike Martin wrote: > snip >> This fails but if I replace >> $type_g=$options{$key}->[4] if $chk=~/$type/ >> >> with either >> $type_g=$options{$key}->[4] if $type=~/$chk/; (ie:reversing the match) >> >

Re: Question about match behaviour

2010-08-04 Thread Chas. Owens
On Wed, Aug 4, 2010 at 11:36, Mike Martin wrote: snip > This fails but if I replace > $type_g=$options{$key}->[4] if $chk=~/$type/ > > with either > $type_g=$options{$key}->[4] if $type=~/$chk/; (ie:reversing the match) > > or > > $type_g=$options{$key}->[4] if $type eq $chk; > > any idea on the r

Re: Question about match behaviour

2010-08-04 Thread John W. Krahn
Mike Martin wrote: Hi Hello, I have the following code my $type='val'; my $type_g; foreach my $key (keys %options){ my $chk=$options{$key}->[3]; $type_g=$options{$key}->[4] if $chk=~/$type/; #$type_g=$options{$key}->[4] if $type=~/$chk/; } print "\n",$type,"\t",$type_g,"\n"; This fails but i

Re: question abt array

2010-06-30 Thread Alan Haggai Alavi
On 30 June 2010 10:31, Chaitanya Yanamadala wrote: > Hai > i am in a situation like i have a scalar $value = 5 > now i need to create an array with the number i mean $value > how can i do it?? > > regards > Chaitanya > Hi Chaitanya, I am not sure if I understood your question well or not. To

Re: question abt array

2010-06-30 Thread C.DeRykus
On Jun 29, 10:01 pm, dr.virus.in...@gmail.com (Chaitanya Yanamadala) wrote: > Hai >  i am in a situation like i have a scalar $value = 5 > now i need to create an array with the number i mean $value > how can i do it?? Before you go down that path, check out the pitfalls and safer alternatives:

Re: question abt array

2010-06-30 Thread Chaitanya Yanamadala
Great Thomas Ur idea has resolved my issue.. i finally solved it after struggling from 16 hours. :) Chaitanya On Wed, Jun 30, 2010 at 12:07 PM, Thomas Bätzler wrote: > Chaitanya Yanamadala asked: > > i am in a situation like i have a scalar $value = 5 > > now i need to create an array with t

Re: question abt array

2010-06-29 Thread Chaitanya Yanamadala
hai Alan Thank you for the reply but this is not what i asked for,, array should be created with the number like this @5 or some thing like @y5 where 5 is the $value if i give some thing like this @y$value it is giving me an error. Chaitanya On Wed, Jun 30, 2010 at 10:40 AM, Alan Haggai Alavi <

Re: Question about example in "Mastering Perl"

2010-03-19 Thread Linux Expert
Of course, I shoulda' seen that. Thanks! On 3/19/10, David Christensen wrote: > Linux Expert wrote: >> if( $!{ENOENT} ) # File doesn't exist >> { >> warn "\tTrying to make directory $dir...\n"; >> mkdir $dir, 0755; >> } >> elsif( $!{ENOSPC} ) # Full disk >> { >> SNIP >> My

Re: Question about example in "Mastering Perl"

2010-03-19 Thread David Christensen
Linux Expert wrote: if( $!{ENOENT} ) # File doesn't exist { warn "\tTrying to make directory $dir...\n"; mkdir $dir, 0755; } elsif( $!{ENOSPC} ) # Full disk { SNIP My question is this: wouldn't the mkdir on line 4 reset the $! value, and also the %! hash if it failed? If s

Re: question on software development

2010-03-09 Thread Rene Schickbauer
Randal L. Schwartz wrote: "ANJAN" == ANJAN PURKAYASTHA writes: ANJAN> OK, suppose I develop a Perl application. I want to create an icon for the ANJAN> program so that a user may download the program and start it in the GUI by ANJAN> double-clicking on the icon. Did I miss something? Where

Re: question on software development

2010-03-08 Thread Raymond Wan
Randal L. Schwartz wrote: "ANJAN" == ANJAN PURKAYASTHA writes: ANJAN> OK, suppose I develop a Perl application. I want to create an icon for the ANJAN> program so that a user may download the program and start it in the GUI by ANJAN> double-clicking on the icon. Did I miss something? Wher

Re: question on software development

2010-03-07 Thread Randal L. Schwartz
> "ANJAN" == ANJAN PURKAYASTHA writes: ANJAN> OK, suppose I develop a Perl application. I want to create an icon for the ANJAN> program so that a user may download the program and start it in the GUI by ANJAN> double-clicking on the icon. Did I miss something? Where did you say "windows"

Re: question on software development

2010-03-07 Thread ANJAN PURKAYASTHA
I completely agree with you Raymond- we should not be pre-judged based on our nationalities or institutional affiliations. Also, IMHO, the only stupid question is the one that is not asked. Forum members, especially beginners, should feel comfortable posting questions without fear of ridicule. Anj

Re: question on software development

2010-03-05 Thread Raymond Wan
ANJAN PURKAYASTHA wrote: Steve my man, Although I appreciate your taking the time to answer my question I must say the tone of you mail was immature and unprofessional. Firstly, you misunderstood my question and secondly not every question can be framed in terms of "code". Given that there are m

Re: question on software development

2010-03-05 Thread ANJAN PURKAYASTHA
Hi David and Shlomi, Thank you very much for your feedback. I am indeed developing a Perl application for which I would like to give the user a short-cut icon on the desktop. I'll follow up on your helpful pointers. Most of my end-users are molecular biologists who are averse to doing anything on

Re: question on software development

2010-03-05 Thread Shlomi Fish
On Friday 05 Mar 2010 06:27:51 David Christensen wrote: > ANJAN PURKAYASTHA wrote: > > OK, suppose I develop a Perl application. I want to create an icon for > > the program so that a user may download the program and start it in the > > GUI by double-clicking on the icon. > > How does one go about

Re: question on software development

2010-03-04 Thread David Christensen
ANJAN PURKAYASTHA wrote: OK, suppose I develop a Perl application. I want to create an icon for the program so that a user may download the program and start it in the GUI by double-clicking on the icon. How does one go about doing it? It sounds like 1) you want to put your Perl application int

Fwd: Re: question on software development

2010-03-04 Thread Steve Bertrand
On 2010.03.04 21:34, ANJAN PURKAYASTHA wrote: > Are you joking? This was supposed to be a serious question. I'll answer it again: - right-click on your desktop - click 'create shortcut' - click 'Browse' - locate the installation package that contains your program from within your network - click

Re: question on software development

2010-03-04 Thread Steve Bertrand
On 2010.03.04 20:04, ANJAN PURKAYASTHA wrote: > OK, suppose I develop a Perl application. I want to create an icon for the > program so that a user may download the program and start it in the GUI by > double-clicking on the icon. > How does one go about doing it? Research Associate at Harvard Uni

Re: question

2010-03-01 Thread Shlomi Fish
On Sunday 28 Feb 2010 22:08:21 Uri Guttman wrote: > > "SO" == S O writes: > SO> sorry guys i apologize for this question, > SO> how come when writing a program that these are not equivalent: > > SO> @files = readdir(D); > > SO> vs > > SO> readdir(D) = @files; > > my question is w

Re: question

2010-02-28 Thread Uri Guttman
> "SO" == S O writes: SO> sorry guys i apologize for this question, SO> how come when writing a program that these are not equivalent: SO> @files = readdir(D); SO> vs SO> readdir(D) = @files; my question is why would you think they are the same? your same question can be asked a

Re: question

2010-02-28 Thread Shlomi Fish
Hi Stace! On Sunday 28 Feb 2010 20:14:57 S O wrote: > sorry guys i apologize for this question, > > how come when writing a program that these are not equivalent: > > @files = readdir(D); > > vs > > readdir(D) = @files; > Well, first of all, use strict and warnings and use lexical filehandle

Re: Question about matching time code evaluation in Perl

2010-01-12 Thread C.DeRykus
On Jan 8, 12:21 pm, frank.w.w...@gmail.com (Soldier) wrote: > Hi, > I came across these two pieces of codes, why would the "local $i=$i+1" > be backtracking-safe? > > $_ = 'lothlorien'; > m/  (?{ $i = 0 })                    # Set $i to 0 >     (.    (?{ $i++ })    )*          # Update $i, even af

Re: Question about split

2009-10-23 Thread John W. Krahn
sanket vaidya wrote: Hi, Hello, Consider the code below: use warnings; use strict; my $string = '100955 BLow-Gomez,Joseph MMEX.AMER. QHUTC012'; my ($id) = split(/\s/,$string); print "id = $id"; Output: 100955 Now remove brackets surrounding $id like as under: use warnings; use strict;

Re: question

2009-10-12 Thread Shlomi Fish
Hi Jesus! I'm BCCing this message to a fellow Perl programmer who also studies in lsu.edu , and whom I've met on the IRC. He would be free to respond to the list and/or to you and me in private. On Monday 12 Oct 2009 23:40:51 Jesus Fernandez wrote: > Hello friends, > > I wrote a program that c

Re: question

2009-10-12 Thread Slick
Wouldn't that work with just changing the variable to 5 000 instead of 10 000 like you have it setup Example: N=5 000 instead of N=10 000  Jason H. Owens From: Jesus Fernandez To: beginners@perl.org Sent: Mon, October 12, 2009 4:40:51 PM Subject: question H

Re: Question on approach

2009-07-27 Thread Jay Savage
On Fri, Jul 24, 2009 at 4:54 AM, Shawn H. Corey wrote: [snip] > Unfortunately, the data is not directly sortable since the date is in > American format, not Système International (SI).  SI dates are directly > sortable and are the preferred format for storing dates. > > I would use a heap to sort

RE: Question on approach

2009-07-24 Thread Joseph L. Casale
>I have no idea what was wrong with me last night. You are absolutely >right, those are not in a sortable format. All the replies led me down the path of enlightenment:) The string before the "@" will always be the same, in fact, I must error check for this, so no need for a hash, I can just appl

Re: Question on approach

2009-07-24 Thread Chas. Owens
On Fri, Jul 24, 2009 at 04:54, Shawn H. Corey wrote: > Chas. Owens wrote: >> >> That date format is directly sortable, so unless you have another >> reason to convert to epoch time just use a string comparison in the >> sort.  I would probably write the code like this: > > Unfortunately, the data i

Re: Question on approach

2009-07-24 Thread John W. Krahn
Shawn H. Corey wrote: Chas. Owens wrote: That date format is directly sortable, so unless you have another reason to convert to epoch time just use a string comparison in the sort. I would probably write the code like this: Unfortunately, the data is not directly sortable since the date is in

Re: Question on approach

2009-07-24 Thread Shawn H. Corey
Chas. Owens wrote: That date format is directly sortable, so unless you have another reason to convert to epoch time just use a string comparison in the sort. I would probably write the code like this: Unfortunately, the data is not directly sortable since the date is in American format, not

Re: Question on approach

2009-07-23 Thread Chas. Owens
On Fri, Jul 24, 2009 at 00:18, Joseph L. Casale wrote: > Hi, > I have some data I will read into an array that is the format > "some_string"@"date" such as "foo/bar/b...@07-23-2009-11.42.02". > > To work with this, I will convert the date part (everything after > the "@" to the epoch format so it's

Re: Question about compilation and dispatch tables

2009-07-19 Thread Uri Guttman
> "SB" == Steve Bertrand writes: SB> My base class reads in a config, and does the following. SB> BEGIN { SB> # global variables those are lexicals scoped to the begin block. SB> my @global_vars = qw ( SB> GLOBAL_STACK_TRACE SB> PROFILING SB> CODE_P

Re: question about constants

2009-06-24 Thread Jenda Krynicky
Steve Bertrand wrote: > Roman Makurin wrote: > > On Wed, Jun 24, 2009 at 03:25:57PM +0200, Jenda Krynicky wrote: > >> From: Roman Makurin > >>> here is complite perl script which produces such results without > >>> any warning: > >>> > >>> #!/usr/bin/perl > >>> > >>> use strict; > >>> use warning

Re: question about constants

2009-06-24 Thread Steve Bertrand
Roman Makurin wrote: > On Wed, Jun 24, 2009 at 03:25:57PM +0200, Jenda Krynicky wrote: >> From: Roman Makurin >>> here is complite perl script which produces such results without >>> any warning: >>> >>> #!/usr/bin/perl >>> >>> use strict; >>> use warnings; >>> >>> use constant { >>> A => 0, >

Re: question about constants

2009-06-24 Thread John W. Krahn
Jenda Krynicky wrote: But of course this does not print anything. The shift(@a) returns the first element of @a which is zero, assigns that to $i and then checks whether it's true. And of course it's not. So it skips the body and leaves the loop. Keep in mind that the value of my $i = sh

Re: question about constants

2009-06-24 Thread Roman Makurin
On Wed, Jun 24, 2009 at 03:25:57PM +0200, Jenda Krynicky wrote: > From: Roman Makurin > > here is complite perl script which produces such results without > > any warning: > > > > #!/usr/bin/perl > > > > use strict; > > use warnings; > > > > use constant { > > A => 0, > > B => 1, > >

Re: question about constants

2009-06-24 Thread Gunnar Hjalmarsson
Steve Bertrand wrote: Roman Makurin wrote: On Wed, Jun 24, 2009 at 04:37:52AM +0200, Gunnar Hjalmarsson wrote: Strange. It looks like strictures and warnings are not enabled (@a and @b are not declared). Try to add use strict; use warnings; and see if that makes Perl give you a hi

Re: question about constants

2009-06-24 Thread Jenda Krynicky
From: Roman Makurin > here is complite perl script which produces such results without > any warning: > > #!/usr/bin/perl > > use strict; > use warnings; > > use constant { > A => 0, > B => 1, > C => 2 }; > > my @a = (A, B, C); > my @b = (1, 2, 3); > > while(my $i = shift @a

Re: question about constants

2009-06-24 Thread Steve Bertrand
Roman Makurin wrote: > On Wed, Jun 24, 2009 at 04:37:52AM +0200, Gunnar Hjalmarsson wrote: >> Strange. >> >> It looks like strictures and warnings are not enabled (@a and @b are not >> declared). Try to add >> >> use strict; >> use warnings; >> >> and see if that makes Perl give you a hin

Re: question about constants

2009-06-24 Thread Roman Makurin
On Wed, Jun 24, 2009 at 04:37:52AM +0200, Gunnar Hjalmarsson wrote: > Strange. > > It looks like strictures and warnings are not enabled (@a and @b are not > declared). Try to add > > use strict; > use warnings; > > and see if that makes Perl give you a hint. > here is complite perl scri

  1   2   3   4   5   6   7   >