#!/usr/bin/perl print qq|<?xml version="1.0"?>|; print "\n"; while($_ = <DATA>){ if (/^\[\w+\]/ .. /^\[\w+\]/) { $save = $_; $save =~ s/\[/</g; $save =~ s/\]/>/g; print $save; } }
I have tried sometime like this. But I am not able to store the values in a variable__DATA__ [DATA] data1 [ENTRY] entry here [STORY] story details [DATA] [ENTRY] another entry here [STORY] another story
In reply to Re^2: convert to XML
by Anonymous Monk
in thread convert to XML
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |