The replacement side in the regex is substituted instead of everything that was matched (while there are ways to alter this to some extent), so you need to capture things intended to be kept as well, and put them back in the replacement side. Like
$var =~ s/^(.{144})(.{15})(.{34})(.)(.*)/$1$3$5/;
(the last capture was added in a comment) or
$var =~ s/^(.{144})\K(.{15})(.{34})(.)(.*)/$3$5/;
Now the 15 chars and the single char are removed from $var, while you still have all of $N (1--5) available to work with as needed. (In the second version the \K keeps all matches previous to it so that they are not getting replaced, and thus we don't need $1 in the replacement side.) Please see perlretut for details.
However, as a comment enlightens us, there is a problem with this: It is not known before runtime which groups need be kept! So it could be 1,3,5 or perhaps 2 and 4 (or 7 and 11?).
What need be kept becomes known, and need be set, before the regex runs.
One way to do that: once the list of capture groups to keep is known store their indices in an array, then capture all matches into an array† and form the replacement and rewrite the string by hand
my @keep_idx = qw(0 2 4); # indices of capture groups to keep
my @captures = $var =~ /^(.{144})(.{15})(.{34})(.)(.*)/;
# Rewrite the variable using only @keep_idx -indexed captures
$var = join '', grep { defined } @captures[@keep_idx];
# Use @captures as needed...
The code above simply filters by grep any possibly non-existent "captures" -- a pattern may allow for a variable number of capture groups (so there may not exist group #5 for example). But I'd rather check those @captures explicitly (were there as many as expected? were they all of the expected form? etc).
There are other ways to do this.‡
† In newer perls (from version 5.25.7) there is the @{^CAPTURE} predefined variable with all captures, so one can run the match $var =~ /.../; and then use it. No need to assign captures.
‡ I'd like to mention one way that may be tempting, and can be seen around, but is best avoided.
One can form a string for the replacement side and double-evaluate it, like so
my $keep = q($1.$3.$5); # perl *code*, concatenating variables
$var =~ s/.../$keep/ee; # DANGEROUS. Runs any code in $keep
Here the modifiers /ee evaluate the right-hand side, and in a way that exposes the program to evaluating code (in $keep) that may have been slipped to it. Search for this for more information but I'd say best don't use it where it matters.