Re: sed split on pipe

2008-05-08 Thread Jay Savage
On Tue, May 6, 2008 at 7:27 AM, Jack Butchie <[EMAIL PROTECTED]> wrote: > Have been googling for some time now and every command I tried fails. I > want to use sed from the command line or use it in a windows batch file to > split on a pipe delimited file, windows server. The examples have \n as

Re: comparing kit names

2008-05-08 Thread perl_learner
On May 7, 4:55 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > perl_learner wrote: > > On May 6, 10:08 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > >> perl_learner wrote: > > >>> my @kits = $KIT_LIST; > > >> How many elements do you think there are in @kits? > > > I have ~100 elements @k

Re: comparing kit names

2008-05-08 Thread Gunnar Hjalmarsson
perl_learner wrote: On May 7, 4:55 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: perl_learner wrote: On May 6, 10:08 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: perl_learner wrote: my @kits = $KIT_LIST; How many elements do you think there are in @kits? I have ~100 elements @kits.

error in printing unicode

2008-05-08 Thread Vlad Stanimir
I just finished reading "Beginning Perl by Simon Cozens Chapter 1: First Steps In Perl" and i tried to print a Unicode character using the \x{} but i got a strange outcome i don't understand. The code was: #!/user/bin/perl use warnings; print "\x{2620}\n"; and the result was: Wide character i

Re: error in printing unicode

2008-05-08 Thread Daniel McClory
There are basically 3 lines that you'll want to be using if you're going to be using unicode in your perl scripts - one for input, one for output, and one for using unicode characters within the perl script itself. binmode STDOUT, ":utf8"; #this tells perl that the stdout is to be enco

Re: error in printing unicode

2008-05-08 Thread Dr.Ruud
Daniel McClory schreef: > use utf8; #this tells perl that there are unicode characters > inside the .pl file No. From the doc: "Do not use this pragma for anything else than telling Perl that your script is written in UTF-8." Also look for "lexical scope" in that doc. Remember, ASCII characters

one liner for for and if

2008-05-08 Thread Richard Lee
#!/usr/bin/perl use warnings; use strict; my @array = qw/one two three four/; print "$_\n" for @array last if "$_" eq q/three/; [EMAIL PROTECTED] tmp]# ./!$ ././././testthis2.pl syntax error at ././././testthis2.pl line 8, near "@array last " Execution of ././././testthis2.pl aborted due to c

Re: one liner for for and if

2008-05-08 Thread Yitzchok Good
if ("$_" eq q/three/) {print "$_\n" for @array last}; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: one liner for for and if

2008-05-08 Thread Rob Dixon
Richard Lee wrote: > #!/usr/bin/perl > > use warnings; > use strict; > > my @array = qw/one two three four/; > > print "$_\n" for @array last if "$_" eq q/three/; > > > [EMAIL PROTECTED] tmp]# ./!$ > ././././testthis2.pl > syntax error at ././././testthis2.pl line 8, near "@array last " > Exec

Re: one liner for for and if

2008-05-08 Thread Rob Dixon
Yitzchok Good wrote: > > if ("$_" eq q/three/) {print "$_\n" for @array last}; That won't even compile. Please don't publish nonsense. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: one liner for for and if

2008-05-08 Thread Richard Lee
Rob Dixon wrote: Richard Lee wrote: #!/usr/bin/perl use warnings; use strict; my @array = qw/one two three four/; print "$_\n" for @array last if "$_" eq q/three/; [EMAIL PROTECTED] tmp]# ./!$ ././././testthis2.pl syntax error at ././././testthis2.pl line 8, near "@array last " Execution