in reply to Re: Help Using Split and Arrays
in thread Help Using Split and Arrays

Thank you for replying.

I'm new to arrays. Can I take the array that's storing the information pulled from the file and split it like you're doing the string you've written into the code?

Something like this?

my @newarray= split (/,/,$data);

It may be easy but for some reason I can't word the questions I have right to get what I need. Maybe that's all I need to do.

Replies are listed 'Best First'.
Re^3: Help Using Split and Arrays
by John M. Dlugosz (Monsignor) on Apr 23, 2011 at 04:54 UTC
    Each item in the array is one string. You need to read this book. I've seen free PDFs for that around the web. You might also try this page. You need to know about scalars and arrays as basic types, how to write loops, and probably everything else. So just start with a beginner book and work through it.

    my @samples= ('a,b,stuff', 'b, c , more stuff'); foreach my $line (@samples) { # work with $line here }
    See Foreach Loops in the Perl documentation.

      Thanks for the reference help. I'll read up and see what I can do!