Re: ASCII to UTF8 in perl, how?

2004-10-16 Thread Gunnar Hjalmarsson
Brian Gunlogson wrote: How do I take a vanilla ASCII string, say the spanish word "tenía", That's not an ASCII string. and convert it to UTF8? perldoc Encode -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: Why are file handles wierd?

2004-10-16 Thread Brian Gunlogson
A filehandle is kinda like a namespace for the file. It shouldn't have a datatype, because it doesn't contain data. --- Siegfried Heintze wrote: > I asked this question previously, but received no response. I sure the > reason was that I was far too verbose. So let me make it simple: > > What is

ASCII to UTF8 in perl, how?

2004-10-16 Thread Brian Gunlogson
Hello list, How do I take a vanilla ASCII string, say the spanish word "tenía", and convert it to UTF8? Brian G. __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail -- To unsubscribe

Re: Why are file handles wierd?

2004-10-16 Thread John W. Krahn
Siegfried Heintze wrote: I asked this question previously, but received no response. I sure the reason was that I was far too verbose. So let me make it simple: What is the logic that says all data types will be prefixed with special character such as "$" or "%" or "@" except file handles? Why are

Re: Why are file handles wierd?

2004-10-16 Thread Gunnar Hjalmarsson
Siegfried Heintze wrote: What is the logic that says all data types will be prefixed with special character such as "$" or "%" or "@" except file handles? It's the syntax of the programming language we are discussing here, rather than "logic". That syntax makes a lot of sense IMO. It's good to know

RE: Why are file handles wierd?

2004-10-16 Thread Siegfried Heintze
Bee, Can you explain why this open statement works? How does $FH have a value? What is the scaler value for? Thanks, Siegfried -Original Message- From: Bee [mailto:[EMAIL PROTECTED] Sent: Saturday, October 16, 2004 3:15 PM To: Siegfried Heintze; [EMAIL PROTECTED] Subject: Re: Why

Re: Why are file handles wierd?

2004-10-16 Thread Bee
> > What is the logic that says all data types will be prefixed with special > character such as "$" or "%" or "@" except file handles? Why are file > handles weird? > > If you like, you can make it look like : open my $FH, "<", \$scalar; while (not eof $FH) { do_something... }; close $FH; D

RE: how to assign an external command aoutput to an array

2004-10-16 Thread Tim Johnson
Or even my @values = split(/ /,qx'..'); should work. I can't test that where I am, but unless there is some weird caveat with the qx operator (which I don't usually use), then it should work. -Original Message- From: Mauro [mailto:[EMAIL PROTECTED] Sent: Friday, Octobe

Re: help on comparing lines in a text file

2004-10-16 Thread Gunnar Hjalmarsson
Alden Meneses wrote: here is my updated code but it is not my loops are not set correctly as I get nothing when i print to screen. open(IBDINA, "<$file") || die "cannot open $file $!"; open(IBDINB, "<$file") || die "cannot open $file $!"; chomp(@list_a=); chomp(@list_b=); for ($a = 0; $a < @lis

What's happening at perl.org?

2004-10-16 Thread Gunnar Hjalmarsson
[ open questions to the administrator of [EMAIL PROTECTED] ] Hi, I'm participating in this list via the newsserver nntp.perl.org, and lately I have noticed that it only works sometimes, even if the postings seem to be queued. Also, the archive at http://www.mail-archive.com/beginners%40perl.org/

Why are file handles wierd?

2004-10-16 Thread Siegfried Heintze
I asked this question previously, but received no response. I sure the reason was that I was far too verbose. So let me make it simple: What is the logic that says all data types will be prefixed with special character such as "$" or "%" or "@" except file handles? Why are file handles weird?

Re: help on comparing lines in a text file

2004-10-16 Thread Alden Meneses
here is my updated code but it is not my loops are not set correctly as I get nothing when i print to screen. open(IBDINA, "<$file") || die "cannot open $file $!"; open(IBDINB, "<$file") || die "cannot open $file $!"; chomp(@list_a=); chomp(@list_b=); for ($a = 0; $a < @list_a; $a+=2){ @ar

RE: scrolling_list and multiples

2004-10-16 Thread Charles K. Clarkson
Charlotte Hee <[EMAIL PROTECTED]> wrote: : Here's the code: : : #!/usr/local/bin/perl -w : : use strict; : use CGI qw(:standard :html3); That's redundant. print join ', ', @{ $CGI::EXPORT_TAGS{':standard'} }; : our(@catArray, $val, $url); Don't use 'our' this way. Use 'my' to declar

Re: re-format database file

2004-10-16 Thread Gunnar Hjalmarsson
Brian Volk wrote: Thank you very much, where can I read more about: local $/ = ''; # enables "paragraph mode" Perl's predefined variables are described in perldoc perlvar The expression "paragraph mode" is not used there, but the technique is described. -- Gunnar Hjalmarsson Email: http://ww

RE: Piping output to and from external perl routine

2004-10-16 Thread Dan Fish
< original request snipped> > > Copy and paste Tom's code into your program. > Yes... I could do that, and HAVE actually done that before for other routines due to the "fire-fighting" time constraints of the moment :-) This time I was hoping to increase my *very-limited* knowledge of Perl for

RE: re-format database file

2004-10-16 Thread Brian Volk
Thank you very much, where can I read more about: local $/ = ''; # enables "paragraph mode" It doesn't seem to be in the Learning Perl book. or I just missed it. Thanks again! Brian > -Original Message- > From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 14

Re: Piping output to and from external perl routine

2004-10-16 Thread John W. Krahn
Dan Fish wrote: Yes... I could do that, and HAVE actually done that before for other routines due to the "fire-fighting" time constraints of the moment :-) This time I was hoping to increase my *very-limited* knowledge of Perl for a more elegant solution, because I'm sure I'll need to do something