PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: extracting data at a specific displacement
Date: Jun 12 2000 2:26PM

Klein, Shoshana R writes:
 > I'm a mainframe programmer with a minimal amount of experience with perl.
 > 
 > 
 > Is there a way to extract data from a flat file based on a specific
 > displacement and length?
 > Until now I've been using regular expressions to match the data  I need, but
 > I find this 
 > very time consuming  when I know I want bytes 43-63 no matter what it
 > contains.

You can use substr() or unpack() for this.

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com