why don't if (<*.foo>) and while(<*foo.>) work together??

2009-12-02 Thread Mark_Galeck
Hello, the while loop here still returns all the matching files. Why?? It seems to me clear, from the discussion in the Camel book, that <*.foo> should all the files when called successively, therefore, here, the first call inside if () should return one file, and the rest of the calls inside whi

Re: reference to anonymous array, references last element instead??

2009-11-30 Thread Mark_Galeck
thank you very much everybody! I appreciate your help. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: why can't I collapse reference variable?

2009-11-30 Thread Mark_Galeck
Thank you very much Charles I appreciate! Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: how to write a debug-print sub with one argument?

2009-11-30 Thread Mark_Galeck
OK, I tried SmartComments, I must not be understanding something, I followed the man page exactly, but it does not seem to work: use Smart::Comments; sub foobar { ### at ... ### $_[0] } foobar 1; and when I run this I get ### at ... ### $_[0] : undef so both of these lines appear to not wo

reference to anonymous array, references last element instead??

2009-11-28 Thread Mark_Galeck
Why does $foobar = \("foo", "bar"); print $$foobar; print "bar" ?? Thank you for any insight. Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

reference to anonymous array, references last element instead??

2009-11-28 Thread Mark_Galeck
Why does $foobar = \("foo", "bar"); print $$foobar; print "bar" ?? Thank you for any insight. Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

why can't I collapse reference variable?

2009-11-25 Thread Mark_Galeck
If I can do this: $ref = \...@foobar; print @$ref; then why can't I do this: print @\...@foobar; Thank you for your help! Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: how to write a debug-print sub with one argument?

2009-11-24 Thread Mark_Galeck
Thank you very much for the great suggestions, I appreciate! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

how to write a debug-print sub with one argument?

2009-11-23 Thread Mark_Galeck
Hello, I want to write a simple debug-print subroutine, which you could call like this: $foobar = "foobar"; dbgPrint foobar; and it would print the variable name and value. I came up with the following: sub dbgPrint { my $arg = $_[0]; my @up = caller;