Is there a simple way to strip blanks from all the lines in a file? What I
am doing is downloading members from my various PDSes. Some of these member
contain the "standard" sequence number in columns 73-80. I am using Perl to
strip these off. After stripping off the sequence numbers, I would like to
strip off any resulting trailing blanks. My current Perl script looks like:
#!/usr/bin/perl
while(<>) {
chop;
s/(.{0,72}).*/\1/;
$new1 = reverse($_);
$_ = $new1;
s/ *(.*)/\1/;
$new = reverse($_);
print $new,"\n";
}
I admit that I'm a tyro Perl person. I'm a legacy mainframer. I am more used
to assembler and REXX.
--
John McKown
Senior Systems Programmer
UICI Insurance Center
Applications & Solutions Team
+1.817.255.3225
This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and its' content is
protected by law. If you are not the intended recipient, you should delete
this message and are hereby notified that any disclosure, copying, or
distribution of this transmission, or taking any action based on it, is
strictly prohibited.