in reply to Help on String manipulation

You would, in line 27, say,

next if $line[0] !~ /^B/;
You can certainly do better with some practice and a better design.

The first step is to place data management above writing html. That is a matter of reporting, and should be well-removed from data processing.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Help on String manipulation
by jiaoziren (Initiate) on May 13, 2006 at 05:15 UTC
    Actually I am just a student, and this is a task assigned to me from my tutor. Since he didn't give us any materials on learning perl, I have to learn all fundamentals from web by myself. I know the algorithm of this snippet is awful easy but I was just stuck on it b'cause I know little about Perl. Anyway, thank you guys for help,really appreciate!

      So I just did your homework for you? I feel so used. lol.

      Do take fifteen minutes to read through perlsyn, and then through perlretut. At least then you'll have the background knowlege that your tutor intended for you to learn, but that we deprived you of by answering your question rather than teaching.


      Dave

        wow,perlretut is exactly what I need!thanks again,you are really nice guys.