NAME
pstrfile - Create a random access file for storing strings (in Perl!)
SYNOPSIS
pstrfile [options] source [out]
DESCRIPTION
pstrfile reads a file containing groups of lines seperated by a line containing a single percentage sign '%' and creates a data file which contains a header structure and a table of offsets for each group of lines. This allows random access of the strings.
The output file, if not specified on the command line, is named source.dat.
pstrfile is a re-implementation of the strfile(8) program found on many Unices. It is meant to show the capabilities of the File::Strfile Perl module.
Options
- -c char
-
Change the delimitting character from the percentage sign to char.
- -V ver
-
Set outputted strfile version. Valid options are 1 and 2. 1 is the default.
- -i
-
Ignore case when sorting strings alphabetically. Used with -o.
- -o
-
Order strings in alphabetical order.
- -r
-
Order strings in random order. -o takes priority over this option.
- -s
-
Run silently, no summary is printed.
- -x
-
Indicate source is ROT-13 ciphered.
EXAMPLES
Here is an example of a typical source strfile:
A can of ASPARAGUS, 73 pigeons, some LIVE ammo, and a FROZEN DAIQUIRI!!
%
A dwarf is passing out somewhere in Detroit!
%
A wide-eyed, innocent UNICORN, poised delicately in a MEADOW filled
with LILACS, LOLLIPOPS & small CHILDREN at the HUSH of twilight??
%
Actually, what I'd like is a little toy spaceship!!
AUTHORS
Written by Samuel Young <samyoung12788@gmail.com>. Some bits were shamelessly copied from the original strfile(8) manual page.
COPYRIGHT
Copyright 2024, Samuel Young
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.