Michael C. Toren on 18 Jan 2006 15:39:48 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Perl question...


On Wed, Jan 18, 2006 at 08:30:30AM -0500, Andrew Libby wrote:
> Okay, so if you've got whitespace in your field values, something more
> like this might work:

It isn't entirely clear to me what the structure of the input file is
based on the posts I've seen.  If the issue is that data can be found at
predefined column numbers, but that sometimes tab characters are used to
jump to the next tab stop, one solution is to simply to have the perl
script expand tabs before parsing:

	use Text::Tabs

	while (my $line = expand <>)
	{
	    my $data = substr $line, 71, 35;
	    ...
	}

-mct
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug