Gloria Hairston wrote:

Hello Gloria,

> Content-Type: multipart/related;
>       type="multipart/alternative";
>       boundary="----_=_NextPart_001_01C6BFE1.F5E4D64A"
[snip]
> ------_=_NextPart_001_01C6BFE1.F5E4D64A
> Content-Type: multipart/alternative;
>       boundary="----_=_NextPart_002_01C6BFE1.F5E4D64A"
> 
> 
> ------_=_NextPart_002_01C6BFE1.F5E4D64A
> Content-Type: text/plain;
>       charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
[snip]
> ------_=_NextPart_002_01C6BFE1.F5E4D64A
> Content-Type: text/html;
>       charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
[snip]
> ------_=_NextPart_001_01C6BFE1.F5E4D64A
> Content-Type: image/jpeg;
>       name="image001.jpg"
> Content-Transfer-Encoding: base64
> Content-ID: <[EMAIL PROTECTED]>
> Content-Description: image001.jpg
> Content-Location: image001.jpg

Please don't send JPEG graphics files to the mailing list and if possible send
only plain text instead of quoted-printable or HTML.  TIA.


> I am new to perl scripting.  I have a record that I am writing to a file
> and the last field in the record is space filled.  How do I fill this
> record with spaces so that my entire record length is 95 characters?
> 
> Sample of record:
> 
> format HEADERNINE =
> @@<<<<<@<<<<<@<<<<<<<@<<<<<<<<<@<<<<<<<<<<<@<<<<<<<<<<<^<<<<<<<<<<<<<<<<
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $sh901,$sh902,$sh903,$sh904,$sh905,$sh906,$sh907,$sh908
> .
> $oldhandle=select(OUTFILE);
> $~ = 'HEADERNINE';
> write;

Use the pack function:

my $out_line = pack 'A A6 A6 A8 A10 A12 A12 A49', $sh901, $sh902, $sh903,
$sh904, $sh905, $sh906, $sh907, $sh908;

print OUTFILE "$out_line\n";



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to