The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



Thread: help with perl
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-16-2008
meghana meghana is offline
Registered User
 

Join Date: Feb 2008
Posts: 56
help with perl

Hi,

I have a set of files where one of the lines in each file will have a <cd> tag in it when i grep for it. It may be in two formats,

1. </ab><cd>35250</cd>
2. <cd>35250</cd>

However it may be, i need to get the number value between <cd>" "</cd>.

Hope i am clear on my question, I am writing a perl script, i have used substr and index commands, but did not work for me, if anyone has any suggestions i appreciate it.

Thanks--
Reply With Quote
Forum Sponsor