extraction of info from fixed position



Instead of specifying in detail (e.g. d+d+...) in a regular expression, is
it possible to specify some fixed numbers for perl to extract information,
in this example, S, 95 from line 1; 'space',42 from line2 and 'T',156 from
line3 in the following 3 lines?

46 51 V S S- 0 0 95 -2,-0.9 -7,-0.2 -6,-0.2
2,-0.1 -0.899 75.7-167.1-103.3 112.1 10.3 5.4 11.8
47 52 E > - 0 0 42 -9,-2.9 3,-1.9 -2,-0.6
2,-0.2 -0.404 37.9 -78.0 -91.0 165.9 6.6 5.6 11.1
48 53 K T 3 S+ 0 0 156 1,-0.3 -1,-0.1
2,-0.2 -10,-0.0 -0.457 122.1 14.4 -66.2 127.7 4.9 5.9 7.7



.



Relevant Pages

  • Questions about the Class::Contract module
    ... a simple syntax for specifying a class's interface; ... useful for writing well-designed OO modules or applications in Perl? ... reasonable workarounds for any serious bugs? ...
    (comp.lang.perl.misc)
  • Questions about the Class::Contract module
    ... a simple syntax for specifying a class's interface; ... useful for writing well-designed OO modules or applications in Perl? ... reasonable workarounds for any serious bugs? ...
    (comp.lang.perl.modules)
  • Re: Why Generics?
    ... > about and specifying the types of variables is a good ... PHP, Ruby, Objective C and Perl will attest. ... Prev by Date: ...
    (comp.lang.java.programmer)
  • Re: Extending C syntax
    ... This is extremely useful and elegant in Perl for specifying default ... but in perl, it yields a if a is not zero, otherwise b. ...
    (comp.lang.c)
  • Re: File::Find question.
    ... >> names rather than the whole path and filename ... > Why are you specifying to circumvent prototypes when the functions ... I'm a very novice perl scripter and all I know, ...
    (comp.lang.perl.misc)