i wanted to print the content given two lines seperately as in i was looking for a way in which i can access the data stored in both the content portions differently,is there a way where i can access the date and actual content differently and hence manipulate them further as per the requirements.i need only the content portion in both the <meta for="" my="" use="" and="" i="" want="" to="" format="" the="" date="" further="" as="" per="" the="" requirements.="" />
[html]
<meta name="abstract" content="Hi." />
<meta name="rel_date" content="20030705" />
[/html]
the code i tried to write is as follows ,i am not able to seperate ,i am using push and pop function to get the data and print it ,i guess we need to use some local variables but i am not sure how to go about to get the desired result,
[php]
foreach $line(
@raw_data) {
if($line =~ /<meta /> {
my $line1=$1;
my $line2=$2;
# push(
@final_array,$line1);
#$popped = pop (
@final_array);
# print ( "$popped \n");
push(
@final_array1,$line2);
$popped = pop (
@final_array1);
print ( "$popped \n");
}
}
[/php]
regards,
mav