54 lines
919 B
Raku
54 lines
919 B
Raku
#!/usr/bin/perl -w
|
|
|
|
format WORKORDER=
|
|
itemB: @<<<<<<<<<<<<<<<<<<<< itemC: @>>>>>>>>
|
|
$itemB, $itemC
|
|
itemA: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
$itemA
|
|
Access: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
$access
|
|
Deck: @<< Stardate: @########.#
|
|
$deck, $stardate
|
|
|
|
.
|
|
|
|
|
|
|
|
# Open file.
|
|
open(WORKORDER, ">yourFile.txt" ) or die "Can't open yourFile.txt", $!;
|
|
|
|
|
|
# Output record.
|
|
$itemA = "This is a itemA";
|
|
$itemB = "itemB";
|
|
$itemC = "Low";
|
|
$access = "no";
|
|
$deck = 17;
|
|
$stardate = 99999.4;
|
|
|
|
write WORKORDER;
|
|
|
|
|
|
# Output record.
|
|
$itemA = "This is the second";
|
|
$itemB = "itemB 2";
|
|
$itemC = "High";
|
|
$access = "Yes";
|
|
$deck = 12;
|
|
$stardate = 99999.5;
|
|
|
|
write WORKORDER;
|
|
|
|
|
|
# Output record.
|
|
$itemA = "This is the third.";
|
|
$itemB = "itemB 3";
|
|
$itemC = "medium";
|
|
$access = "Via Jefferies Tube";
|
|
$deck = 10;
|
|
$stardate = 95212.0;
|
|
|
|
write WORKORDER;
|
|
|
|
# Close file.
|
|
close(WORKORDER); |