in reply to Alternative to substr on unknown length of scalar
update I misunderstood the question. I thought you wanted at most 6 characters, but it seems you want always exactly 6 characters. In that case use:
sprintf("%6.6s", $line)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Alternative to substr on unknown length of scalar
by periapt (Hermit) on Oct 19, 2004 at 13:04 UTC | |
by thospel (Hermit) on Oct 19, 2004 at 15:04 UTC | |
by periapt (Hermit) on Oct 20, 2004 at 20:09 UTC | |
|
Re^2: Alternative to substr on unknown length of scalar
by PerlingTheUK (Hermit) on Oct 19, 2004 at 11:02 UTC |