Hey im just playing around with perl (ive made a poll and a crappy message board-type-thing) and right now when i make my data i spereate similar pieces of information with special characters and later split() it. like for example if this was my forum data it would go, subject, author, message like so:
Hi!`!
Me!`!
Whats up in the house
~=~
Whoa!`!
Bob!`!
Shut yo mouth
so if i wanted to split up the posts it would go like
@TheData = <MYFILE>;
$TheData = @TheData;
@Posts = split(/~=~/, $TheData);
and voila i have an array of posts, and if i want to split it up by subject author and message i just do it again to the @Posts array.
Does anyone know an easier way to seperate data and get it?
Hi!`!
Me!`!
Whats up in the house
~=~
Whoa!`!
Bob!`!
Shut yo mouth
so if i wanted to split up the posts it would go like
@TheData = <MYFILE>;
$TheData = @TheData;
@Posts = split(/~=~/, $TheData);
and voila i have an array of posts, and if i want to split it up by subject author and message i just do it again to the @Posts array.
Does anyone know an easier way to seperate data and get it?