Re: Question about split

2009-10-23 Thread John W. Krahn
sanket vaidya wrote: Hi, Hello, Consider the code below: use warnings; use strict; my $string = '100955 BLow-Gomez,Joseph MMEX.AMER. QHUTC012'; my ($id) = split(/\s/,$string); print "id = $id"; Output: 100955 Now remove brackets surrounding $id like as under: use warnings; use strict;

Question about split

2009-10-23 Thread sanket vaidya
Hi, Consider the code below: use warnings; use strict; my $string = '100955 BLow-Gomez,Joseph MMEX.AMER. QHUTC012'; my ($id) = split(/\s/,$string); print "id = $id"; Output: 100955 Now remove brackets surrounding $id like as under: use warnings; use strict; my $s

Re: xml simple question

2009-10-23 Thread Shlomi Fish
On Friday 23 Oct 2009 15:16:15 Shawn H Corey wrote: > getget wrote: > > The content of 2 files output.xml and input.xml are different. How can > > I create the output file its content the same with input.xml. > > Use a different parser than XML::Simple. I suggest XML::Twig. > > XML::Simple does

Re: Building a fmt line for printf with a carriage return

2009-10-23 Thread Shawn H Corey
Wagner, David --- Senior Programmer Analyst --- CFS wrote: > I thought I had done this before, but I guess not. I build a formt line > for printf like: > q[%-3s%-4s%5s%6s]; > But I want to insert a carriage return after say %-4s( I have a nubmer > of fields and depending

Re: xml simple question

2009-10-23 Thread Shawn H Corey
getget wrote: > The content of 2 files output.xml and input.xml are different. How can > I create the output file its content the same with input.xml. Use a different parser than XML::Simple. I suggest XML::Twig. XML::Simple does not distinguish between attributes and content. Because of this, i

xml simple question

2009-10-23 Thread getget
Hi All. When using XML::Sample, I have a question, who can help me. First I have output.xml file: Mp3 converter Real player Microsoft project Poedit Metrix Line Sudoku I use XML::Sample to read, after that I save to ou

Building a fmt line for printf with a carriage return

2009-10-23 Thread Wagner, David --- Senior Programmer Analyst --- CFS
I thought I had done this before, but I guess not. I build a formt line for printf like: q[%-3s%-4s%5s%6s]; But I want to insert a carriage return after say %-4s( I have a nubmer of fields and depending on the size, it is not a constant after column 2, but could b