I have the following two lines of code:
I believe this is removing all the white space from the beginning and the end of each line of data in the file. Then it is splitting the line into two separate variables based on white space found on each line.
I want to modify it to that the Split function will split the line up into two separate variables based on a comma, and not white space. I have no clue what to modify in order to make that happen.
Any suggestions, would be helpful! Perl is new to me, and I just have not managed to get my head wrapped around all the substitution formats and rules.
Thanks in advanced!
Code:
$line =~ s/(^\s+|\s+$)//g; my($account, $warning) = split(/\s+/, $line);
I want to modify it to that the Split function will split the line up into two separate variables based on a comma, and not white space. I have no clue what to modify in order to make that happen.
Any suggestions, would be helpful! Perl is new to me, and I just have not managed to get my head wrapped around all the substitution formats and rules.
Thanks in advanced!
Comment