in reply to To print the file in spool with the new format of input file also
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: To print the file in spool with the new format of input file also
by flexvault (Monsignor) on Oct 14, 2015 at 23:33 UTC | |
|
Re^2: To print the file in spool with the new format of input file also
by skr302 (Initiate) on Oct 15, 2015 at 04:38 UTC | |
by GotToBTru (Prior) on Oct 15, 2015 at 12:44 UTC | |
by skr302 (Initiate) on Oct 15, 2015 at 05:02 UTC | |
by AppleFritter (Vicar) on Oct 15, 2015 at 10:34 UTC | |
by Laurent_R (Canon) on Oct 15, 2015 at 08:47 UTC | |
by soonix (Chancellor) on Oct 15, 2015 at 14:18 UTC |