It looks like line 165 is meant to recognize a valid filename and breaks up $basename into components, and in line 177 those components are named and stored in 7 variables. You could come up with a second regular expression to recognize and decompose the new filename format into those same 7 variables.
But if these are truly fixed length and format file names, you might find it easier to use unpack or substr instead of regular expressions for this purpose. It is said that the man who tries to solve his problem with a regular expression now has two problems, and that applies especially for the new programmer. When they work, they can do amazing things. But if you don't really need them, you can save yourself some grief.
In reply to Re: To print the file in spool with the new format of input file also
by GotToBTru
in thread To print the file in spool with the new format of input file also
by skr302
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |