in reply to Re: How to split a string
in thread How to split a string

The purpose of splitting the string into serialized variables is to use the values in those variables as flags to control reporting granularity. If properly deployed in the Perl code will allow for adjustment of what is reported to a logfile without having to modify the Perl code. The only modification will be to the control string which is housed in an SQL table. Thank you for considering my question.

R_D

Replies are listed 'Best First'.
Re^3: How to split a string
by kutsu (Priest) on Jan 28, 2005 at 22:22 UTC

    Then you can use a for or foreach loop (despite the two tutorials for and foreach are exactly the same in perl, super search if you want to know more) to process each field of an array. Like this:

    my $str = '1029576843'; my @f = split //, $str; for (@f) { #$_ is now 0; next run will be 1 and so on print; } #or for my $current_number (@f) { #$current_number is now 0; next run will be 1 and so on print $current_number; }

    "Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce