Main > Free Download Search >

Free file formats that software for linux

file formats that

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3501
File::Format::RIFF 1.0.1

File::Format::RIFF 1.0.1


File::Format::RIFF is a Perl module to Resource Interchange File Format/RIFF files. more>>
File::Format::RIFF is a Perl module to Resource Interchange File Format/RIFF files.

SYNOPSIS

use File::Format::RIFF;

open( IN, file ) or die "Could not open file: $!";
my ( $riff1 ) = File::Format::RIFF->read( *IN );
close( IN );
$riff1->dump;

my ( $riff2 ) = new File::Format::RIFF( TYPE );
foreach my $chunk ( $riff1->data )
{
next if ( $chunk->id eq LIST );
$riff2->addChunk( $chunk->id, $chunk->data );
}
open( OUT, ">otherfile" ) or die "Could not open file: $!";
$riff2->write( *OUT );
close( OUT );

File::Format::RIFF provides an implementation of the Resource Interchange File Format. You can read, manipulate, and write RIFF files.

CONSTRUCTORS

$riff = new File::Format::RIFF( $type, $data );

Creates a new File::Format::RIFF object. $type is a four character code that identifies the type of this particular RIFF file. Certain types are defined to have a format, specifying which chunks must appear (e.g., WAVE files). If $type is not specified, it defaults to (four spaces). $data must be an array reference containing some number of RIFF lists and/or RIFF chunks. If $data is undef or not specified, then the new RIFF object is initialized empty.

$riff = File::Format::RIFF->read( $fh, $filesize );

Reads and parses an existing RIFF file from the given filehandle $fh. An exception will be thrown if the file is not a valid RIFF file. $filesize controls one aspect of the file format checking -- if $filesize is not specified, then stat will be called on $fh to determine how much data to expect. You may explicitly specify how much data to expect by passing in that value as $filesize. In either case, the amount of data read will be checked to make sure it matches the amount expected. Otherwise, it will throw an exception. If you do not wish it to make this check, pass in undef for $filesize.

Please note, if you wish to read an "in memory" filehandle, such as by doing this: open( $fh, read( $fh, $filesize );

The read constructor may also be used as a method. If used in this manner, then all existing data contained in $riff will be discarded, and replaced by the contents read from $fh.

$riff->write( $fh );

Outputs a properly-formatted RIFF file to the given filehandle $fh.

<<less
Download (0.009MB)
Added: 2007-04-27 License: Perl Artistic License Price:
916 downloads
Time::Format 1.02

Time::Format 1.02


Time::Format is a Perl module for easy-to-use date/time formatting. more>>
Time::Format is a Perl module for easy-to-use date/time formatting.

SYNOPSIS

use Time::Format qw(%time %strftime %manip);

$time{$format}
$time{$format, $unixtime}

print "Today is $time{yyyy/mm/dd}n";
print "Yesterday was $time{yyyy/mm/dd, time-24*60*60}n";
print "The time is $time{hh:mm:ss}n";
print "Another time is $time{H:mm am tz, $another_time}n";
print "Timestamp: $time{yyyymmdd.hhmmss.mmm}n";
%time also accepts Date::Manip strings and DateTime objects:
$dm = Date::Manip::ParseDate(last monday);
print "Last monday was $time{Month d, yyyy, $dm}";
$dt = DateTime->new (....);
print "Heres another date: $time{m/d/yy, $dt}";
It also accepts most ISO-8601 date/time strings:
$t = 2005/10/31T17:11:09; # date separator: / or - or .
$t = 2005-10-31 17.11.09; # in-between separator: T or _ or space
$t = 20051031_171109; # time separator: : or .
$t = 20051031171109; # separators may be omitted
$t = 2005/10/31; # date-only is okay
$t = 17:11:09; # time-only is okay
# But not:
$t = 20051031; # date-only without separators
$t = 171109; # time-only without separators
# ...because those look like epoch time numbers.
%strftime works like POSIXs strftime, if you like those %-formats.
$strftime{$format}
$strftime{$format, $unixtime}
$strftime{$format, $sec,$min,$hour, $mday,$mon,$year, $wday,$yday,$isdst}

print "POSIXish: $strftime{%A, %B %d, %Y, 0,0,0,12,11,95,2}n";
print "POSIXish: $strftime{%A, %B %d, %Y, 1054866251}n";
print "POSIXish: $strftime{%A, %B %d, %Y}n"; # current time
%manip works like Date::Manips UnixDate function.
$manip{$format};
$manip{$format, $when};

print "Date::Manip: $manip{%m/%d/%Y}n"; # current time
print "Date::Manip: $manip{%m/%d/%Y,last Tuesday}n";
These can also be used as standalone functions:
use Time::Format qw(time_format time_strftime time_manip);

print "Today is ", time_format(yyyy/mm/dd, $some_time), "n";
print "POSIXish: ", time_strftime(%A %B %d, %Y,$some_time), "n";
print "Date::Manip: ", time_manip(%m/%d/%Y,$some_time), "n";

This module creates global pseudovariables which format dates and times, according to formatting codes you pass to them in strings.

The %time formatting codes are designed to be easy to remember and use, and to take up just as many characters as the output time value whenever possible. For example, the four-digit year code is "yyyy", the three-letter month abbreviation is "Mon".

The nice thing about having a variable-like interface instead of function calls is that the values can be used inside of strings (as well as outside of strings in ordinary expressions). Dates are frequently used within strings (log messages, output, data records, etc.), so having the ability to interpolate them directly is handy.

Perl allows arbitrary expressions within curly braces of a hash, even when that hash is being interpolated into a string. This allows you to do computations on the fly while formatting times and inserting them into strings. See the "yesterday" example above.

The format strings are designed with programmers in mind. What do you need most frequently? 4-digit year, month, day, 24-based hour, minute, second -- usually with leading zeroes. These six are the easiest formats to use and remember in Time::Format: yyyy, mm, dd, hh, mm, ss. Variants on these formats follow a simple and consistent formula. This module is for everyone who is weary of trying to remember strftime(3)s arcane codes, or of endlessly writing $t[4]++; $t[5]+=1900 as you manually format times or dates.

Note that mm (and related codes) are used both for months and minutes. This is a feature. %time resolves the ambiguity by examining other nearby formatting codes. If its in the context of a year or a day, "month" is assumed. If in the context of an hour or a second, "minute" is assumed.

The format strings are not meant to encompass every date/time need ever conceived. But how often do you need the day of the year (strftimes %j) or the week number (strftimes %W)?

For capabilities that %time does not provide, %strftime provides an interface to POSIXs strftime, and %manip provides an interface to the Date::Manip modules UnixDate function.

If the companion module Time::Format_XS is also installed, Time::Format will detect and use it. This will result in a significant speed increase for %time and time_format.

<<less
Download (0.038MB)
Added: 2007-07-19 License: Perl Artistic License Price:
830 downloads
File::Comments 0.07

File::Comments 0.07


File::Comments is a Perl module that ecognizes file formats and extracts format-specific comments. more>>
File::Comments is a Perl module that ecognizes file formats and extracts format-specific comments.

SYNOPSIS

use File::Comments;

my $snoop = File::Comments->new();

# *----------------
# | program.c:
# | /* comment */
# | main () {}
# *----------------
my $comments = $snoop->comments("program.c");
# => [" comment "]

# *----------------
# | script.pl:
# | # comment
# | print "howdy!n"; # another comment
# *----------------
my $comments = $snoop->comments("script.pl");
# => [" comment", " another comment"]

# or strip comments from a file:
my $stripped = $snoop->stripped("script.pl");
# => "print "howdy!n";"

# or just guess a files type:
my $type = $snoop->guess_type("program.c");
# => "c"

File::Comments guesses the type of a given file, determines the format used for comments, extracts all comments, and returns them as a reference to an array of chunks. Alternatively, it strips all comments from a file.

Currently supported are Perl scripts, C/C++ programs, Java, makefiles, JavaScript, Python and PHP.

The plugin architecture used by File::Comments makes it easy to add new formats. To support a new format, a new plugin module has to be installed. No modifications to the File::Comments codebase are necessary, new plugins will be picked up automatically.

File::Comments can also be used to simply guess a files type. It it somewhat more flexible than File::MMagic and File::Type. File types in File::Comments are typically based on file name suffixes (*.c, *.pl, etc.). If no suffix is available, or a given suffix is ambiguous (e.g. if several plugins have registered a handler for the same suffix), then the files content is used to narrow down the possibilities and arrive at a decision.

WARNING: THIS MODULE IS UNDER DEVELOPMENT, QUALITY IS ALPHA. IF YOU FIND BUGS, OR WANT TO CONTRIBUTE PLUGINS, PLEASE SEND THEM MY WAY.

<<less
Download (0.012MB)
Added: 2007-06-09 License: Perl Artistic License Price:
868 downloads
Tie::Formatted 0.02

Tie::Formatted 0.02


Tie::Formatted is a Perl module embed sprintf() formatting in regular print(). more>>
Tie::Formatted is a Perl module embed sprintf() formatting in regular print().

SYNOPSIS

use Tie::Formatted;
print "The value is $format{$number, "%3d"} ",
"(or $format{$number, "%04x"} in hex)n";

print "some numbers: $format{ 12, 492, 1, 8753, "%04d"}n";

This module creates a global read-only hash, %format, for formatting data items with standard sprintf format specifications. Since its a hash, you can interpolate it into strings as well as use it standalone.

The hash should be "accessed" with two or more "keys". The last key is interpreted as a sprintf format for each data item specified in the preceeding arguments. This allows you to format multiple items at once using the same format for each.

Alternate name

If you prefer, you can specify a different name for the magical formatting hash by supplying it as as argument when useing the module:

use Tie::Formatted qw(z);

This makes %z the magic hash instead.

print "This is hex: $z{255, "%04x"}n";

Tie::Formatted currently supports only one format in the final argument; this may change if there is demand for it.

<<less
Download (0.005MB)
Added: 2007-01-15 License: Perl Artistic License Price:
1012 downloads
File::Sort 1.01

File::Sort 1.01


File::Sort is a Perl module to sort a file or merge sort multiple files. more>>
File::Sort is a Perl module to sort a file or merge sort multiple files.

SYNOPSIS

use File::Sort qw(sort_file);
sort_file({
I => [qw(file_1 file_2)],
o => file_new, k => 5.3,5.5rn, -t => |
});

sort_file(file1, file1.sorted);

This module sorts text files by lines (or records). Comparisons are based on one or more sort keys extracted from each line of input, and are performed lexicographically. By default, if keys are not given, sort regards each input line as a single field. The sort is a merge sort. If you dont like that, feel free to change it.

Options

The following options are available, and are passed in the hash reference passed to the function in the format:

OPTION => VALUE

Where an option can take multiple values (like I, k, and pos), values may be passed via an anonymous array:

OPTION => [VALUE1, VALUE2]

Where the OPTION is a switch, it should be passed a boolean VALUE of 1 or 0.
This interface will always be supported, though a more perlish interface may be offered in the future, as well. This interface is basically a mapping of the command-line options to the Unix sort utility.

I INPUT

Pass in the input file(s). This can be either a single string with the filename, or an array reference containing multiple filename strings.

c

Check that single input fle is ordered as specified by the arguments and the collating sequence of the current locale. No output is produced; only the exit code is affected.

m

Merge only; the input files are assumed to already be sorted.

o OUTPUT

Specify the name of an OUTPUT file to be used instead of the standard output.

u

Unique: Suppresses all but one in each set of lines having equal keys. If used with the c option check that there are no lines with consecutive lines with duplicate keys, in addition to checking that the input file is sorted.

y MAX_SORT_RECORDS

Maximum number of lines (records) read before writing to temp file. Default is 200,000. This may eventually change to be kbytes instead of lines. Lines was easier to implement. Can also specify with MAX_SORT_RECORDS environment variable.

F MAX_SORT_FILES

Maximum number of temp files to be held open at once. Default to 40, as older Windows ports had quite a small limit. Can also specify with MAX_SORT_FILES environment variable. No temp files will be used at all if MAX_SORT_RECORDS is never reached.

D

Send debugging information to STDERR. Behavior subject to change.
The following options override the default ordering rules. When ordering options appear independent of any key field specifications, the requested field ordering rules are applied globally to all sort keys. When attached to a specific key (see k), the specified ordering options override all global ordering options for that key.

d

Specify that only blank characters and alphanumeric characters, according to the current locale setting, are significant in comparisons. d overrides i.

f

Consider all lower-case characters that have upper-case equivalents, according to the current locale setting, to be the upper-case equivalent for the purposes of comparison.

i

Ignores all characters that are non-printable, according to the current locale setting.

n

Does numeric instead of string compare, using whatever perl considers to be a number in numeric comparisons.

r

Reverse the sense of the comparisons.

b

Ignore leading blank characters when determining the starting and ending positions of a restricted sort key. If the b option is specified before the first k option, it is applied to all k options. Otherwise, the b option can be attached indepently to each field_start or field_end option argument (see below).

t STRING

Use STRING as the field separator character; char is not considered to be part of a field (although it can be included in a sort key). Each occurrence of char is significant (for example, delimits an empty field). If t is not specified, blank characters are used as default field separators; each maximal non-empty sequence of blank characters that follows a non-blank character is a field separator.

X STRING

Same as t, but STRING is interpreted as a Perl regular expression instead. Do not escape any characters (/ characters need to be escaped internally, and will be escaped for you).

The string matched by STRING is not included in the fields themselves, unless demanded by perls regex and split semantics (e.g., regexes in parentheses will add that matched expression as an extra field). See perlre and "split" in perlfunc.

R STRING

Record separator, defaults to newline.

k pos1[,pos2]

The keydef argument is a restricted sort key field definition. The format of this definition is:

field_start[.first_char][type][,field_end[.last_char][type]]

where field_start and field_end define a key field restricted to a portion of the line, and type is a modifier from the list of characters b, d, f, i, n, r. The b modifier behaves like the b option, but applies only to the field_start or field_end to which it is attached. The other modifiers behave like the corresponding options, but apply only to the key field to which they are attached; they have this effect if specified with field_start, field_end, or both. If any modifier is attached to a field_start or a field_end, no option applies to either.

Occurrences of the k option are significant in command line order. If no k option is specified, a default sort key of the entire line is used. When there are multiple keys fields, later keys are compared only after all earlier keys compare equal.
Except when the u option is specified, lines that otherwise compare equal are ordered as if none of the options d, f, i, n or k were present (but with r still in effect, if it was specified) and with all bytes in the lines significant to the comparison. The order in which lines that still compare equal are written is unspecified.

pos +pos1 [-pos2]

Similar to k, these are mostly obsolete switches, but some people like them and want to use them. Usage is:

+field_start[.first_char][type] [-field_end[.last_char][type]]

Where field_end in k specified the last position to be included, it specifes the last position to NOT be included. Also, numbers are counted from 0 instead of 1. pos2 must immediately follow corresponding +pos1. The rest should be the same as the k option.

Mixing +pos1 pos2 with k is allowed, but will result in all of the +pos1 pos2 options being ordered AFTER the k options. It is best if you Dont Do That. Pick one and stick with it.

Here are some equivalencies:

pos => +1 -2 -> k => 2,2
pos => +1.1 -1.2 -> k => 2.2,2.2
pos => [+1 -2, +3 -5] -> k => [2,2, 4,5]
pos => [+2, +0b -1] -> k => [3, 1b,1]
pos => +2.1 -2.4 -> k => 3.2,3.4
pos => +2.0 -3.0 -> k => 3.1,4.0

<<less
Download (0.032MB)
Added: 2007-04-30 License: Perl Artistic License Price:
909 downloads
File::Locate 0.61

File::Locate 0.61


File::Locate is a Perl module to search the (s)locate-database from Perl. more>>
File::Locate is a Perl module to search the (s)locate-database from Perl.

SYNOPSIS

use File::Locate;

print join "n", locate "mp3", "/usr/var/locatedb";

# or only test of something is in the database

if (locate("mp3", "/usr/var/locatedb")) {
print "yep...sort of mp3 there";
}

# do regex search
print join "n", locate "^/usr", -rex => 1, "/usr/var/locatedb";

ABSTRACT

Search the (s)locate-database from Perl

File::Locate provides the locate() function that scans the locate database for a given substring or POSIX regular expression. The module can handle both plain old locate databases as well as the more hip slocate format.

<<less
Download (0.020MB)
Added: 2006-11-11 License: Perl Artistic License Price:
1077 downloads
Format on Save 1.1.0

Format on Save 1.1.0


Format on Save is a Eclipse plugin to automatically organizes imports and formats code when saving a Java editor. more>>
Format on Save is a Eclipse plugin to automatically organizes imports and formats code when saving a Java editor.

This is the exact equivalent as doing Ctrl-Shift-O, Ctrl-Shift-F before saving. New features: - Sort Members and Correct Indentation - preference page to configure defaults

<<less
Download (0.051MB)
Added: 2006-09-13 License: GPL (GNU General Public License) Price:
1138 downloads
Fortran::Format 0.90

Fortran::Format 0.90


Fortran::Format is a Perl module to read and write data according to a standard Fortran 77 FORMAT. more>>
Fortran::Format is a Perl module to read and write data according to a standard Fortran 77 FORMAT.

SYNOPSYS

use Fortran::Format;

my $f = Fortran::Format->new("2(N: ,I4,2X)");
print $f->write(1 .. 10);
# prints the following:
# N: 1 N: 2
# N: 3 N: 4
# N: 5 N: 6
# N: 7 N: 8
# N: 9 N: 10

# if you dont want to save the format object,
# just chain the calls:
Fortran::Format->new("2(N: ,I4,2X)")->write(1 .. 10);

This is a Perl implementation of the Fortran 77 formatted input/output facility. One possible use is for producing input files for old Fortran programs, making sure that their column-oriented records are rigorously correct. Fortran formats may also have some advantages over printf in some cases: it is very easy to output an array, reusing the format as needed; and the syntax for repeated columns is more concise. Unlike printf, for good or ill, Fortran-formatted fields never exceed their desired width. For example, compare

printf "%3d", 12345; # prints "12345"
print Fortran::Format->new("I3")->write(12345); # prints "***"

This implementation was written in pure Perl, with portability and correctness in mind. It implements the full ANSI standard for Fortran 77 Formats (or at least it should). It was not written with speed in mind, so if you need to process millions of records it may not be what you need.

<<less
Download (0.018MB)
Added: 2007-04-20 License: Perl Artistic License Price:
925 downloads
X File Explorer 1.00

X File Explorer 1.00


X File Explorer is a file manager for the X Window System. more>>
X File Explorer (Xfe) is an MS-Explorer like file manager for X. X File Explorer is based on the popular, but discontinued, X Win Commander, originally developed by Maxim Baranov.
Xfe aims to be the file manager of choice for all the Unix addicts!
Why another file manager when the excellent Konqueror or Nautilus exist on Linux systems? The answer is quite simple : these file managers are very good, features rich and look wonderful, but they are like a brontosaurus when you are a console addict and only want to copy some files or delete it. Another problem is that they require either the whole Gnome or KDE desktops to be installed on your system!
On the contrary, Xfe is small, very rapid and only requires the FOX library to be fully functional. It can be launched from the command line in a fraction of second, and can efficiently complete the set of command line tools.
Main features:
- Four different file manager styles (one panel, two panels, tree list and one panel, tree list and two panels)
- Integrated text viewer (X File View, xfv)
- Integrated RPM viewer / installer / uninstaller (X File Query, xfq)
- Status line
- File associations
- Auto save registry
- Right mouse click pop-up menu in tree list and file list
- Change file(s) attributes
- Mount/Unmount devices (for Linux only)
- Toolbar
- Bookmarks (up to 20)
- Color schemes (GNOME, KDE, Windows...)
- Drag and Drop ( ctrl -> copy, shift -> move, alt -> symlink )
- Create / Extract archives (tar, zip, gzip, bzip2, compress formats are supported)
- Tool tips for long file names
- Progress bars or dialogs for lengthy file operations
- Image preview as thumbnails
- Ability to enqueue multimedia files (open command)
Key bindings:
- Help - F1
- View - F3, return
- Edit - F4
- Copy - F5, ctrl-c
- Cut - ctrl-x
- Paste - ctrl-v
- Move - F6, ctrl-d
- Rename - ctrl-n
- Delete - F8, del, ctrl-del
- Symlink - ctrl-s
- New file - F2
- New folder - F7
- Properties - F9
- Tree and one panel - ctrl-F1
- Tree and two panels - ctrl-F2
- One panel - ctrl-F3
- Two panels - ctrl-F4
- Hidden files - ctrl-F5
- Hidden folders - ctrl-F6
- Execute - ctrl-e
- Go home - ctrl-h
- Go up - backspace
- Terminal - ctrl-t
- Console file manager - ctrl-k
- Refresh - ctrl-r
- Select all - ctrl-a
- Deselect all - ctrl-z
- Invert selection - ctrl-i
- Add bookmark - ctrl-b
- Mount (Linux only) - ctrl-m
- Unmount (Linux only) - ctrl-u
- Quit - ctrl-q
<<less
Download (1.6MB)
Added: 2007-07-17 License: GPL (GNU General Public License) Price:
839 downloads
File::Maker 0.05

File::Maker 0.05


File::Maker is a Perl module that mimics a make by loading a database and calling targets methods. more>>
File::Maker is a Perl module that mimics a make by loading a database and calling targets methods.

SYNOPSIS

#####
# Subroutine interface
#
use File::Maker qw(load_db);

%data = load_db($pm);

######
# Object interface
#
require File::Maker;

$maker = $maker->load_db($pm);

$maker->make_targets(%targets, @targets, %options );
$maker->make_targets(%targets, %options );

$maker = new File::Maker(@options);

Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.

When porting low level C code from one architecture to another, makefiles do provide some level of automation and save some time. However, once Perl or another high-level language is up and running, the high-level language usually allows much more efficient use of programmers time; otherwise, whats point of the high-level language. Thus, makes great economically sense to switch from makefiles to high-level language.

The File::Maker program module provides a "make" style interface as shown in the herein above. The @targets contains a list of targets that mimics the targets of a makefile. The targets are subroutines written in Perl in a separate program module from the File::Maker. The separate target program module inherits the methods in the File::Maker program module as follows:

use File::Maker;
use vars qw( @ISA );
@ISA = qw(File::Maker);

The File::Maker methods will then find the target subroutines in the separate target program module.

The File::Maker provides for the loading of a hash from a program module to provide for the capabilities of defines in a makefile. The option pm = $file> tells File::Maker to load a database from the __DATA__ section of a program module that is in the Tie::Form format. The Tie::Form format is a very flexible lenient format that is about as close to a natural language form and still have the precision of being machine readable.

This provides a more flexible alternative to the defines in a makefile. The define hash is in a separate, very flexible form program module. This arrangement allows one target program module that inherits the File::Maker program module to produce as many different outputs as there are Tie::Form program modules.

<<less
Download (0.076MB)
Added: 2007-02-16 License: Perl Artistic License Price:
980 downloads
File::FilterFuncs 0.53

File::FilterFuncs 0.53


File::FilterFuncs is a Perl module that specify filter functions for files. more>>
File::FilterFuncs is a Perl module that specify filter functions for files.

SYNOPSIS

use File::FilterFuncs qw(filters);

filters(source.txt,
sub { $_ = uc $_; 1 },
dest.txt
);

INTRODUCTION

File::FilterFuncs makes it easy to perform transformations on files. When you use this module, you specify a group of filter functions that perform transformations on the lines in a source file. Those transformed lines are written to the destination file that you specify. For example, this code converts an entire file to upper-case, line-by-line:
use File::FilterFuncs qw(filters);

filters(source.txt,
sub { $_ = uc $_; 1 },
dest.txt
);

The "1" at the end of the filter subroutine tells filters to keep all the lines. The filter subroutine should return 1 for any lines that should be kept, and it should return 0 for any lines that should be ignored. This program copies only lines that contain something besides just whitespace:

use File::FilterFuncs qw(filters);

filters(source.txt,
sub { /S/ },
dest.txt
);

The entire source file is not read into memory. Instead it is read one line at a time, and the destination file is written one line at a time.

Just as Perls concept of a line can be changed by setting $/, so the filters functions idea of a line can also be changed by specifying a value for $/ in the call to filters:

my $pad = " " x 2;
filters(source.dat,
$/ => 1022,
sub { $_ .= $pad; 1 },
dest.dat
);

Filter functions are invoked in the order in which they are seen. This code upper-cases then puts inside parenthses every line in source.txt and copies the output to dest.txt:

filters (source.txt,
sub { $_ = uc $_; 1 },
sub { chomp $_; $_ = "($_)n"; 1 },
dest.txt
);

Obviously, the current line that is being worked on is in $_.

The filters subroutine expects its first argument to be the name of the source file, and the last argument should be the name of the destination file. The function filters will die if either one of the file names is missing or if they are inaccessible.

OPTIONS

A few options determine how the filters subroutine works.

binmode

Binmode lets you specify a layer to be used for the input data. For example, this will read a utf-8 file and write the data using the default output layer:

filters (
source.txt,
binmode => :utf8,
dest.txt,
);

boutmode

Boutmode lets the programmer specify a layer to be used for writing the output data. For example, this code on a Linux platform should read text data using the Linux end-of-line format and write it using the DOS (CRLF) end-of-line format:

filters (
source.txt,
boutmode => :crlf,
dest.txt,
);
$/

Setting $/ lets you determine how an end-of-line is recognized. Set this option to the same value that you would set the $/ variable to in a program. For example, suppose a file contains this:

ABCDEFGHIJKL

The following program should write three letters at a time to the output file:
filters (

source.txt,
$/ => 3,
sub { $_ = "$_n"; 1 },
dest.txt,
);

NOTES

Alternate function name

If you consider the function name filters to be too generic, you can import the name filter_funcs instead.

Convenience return values

For the programmers convenience and to facilitate self-documenting code, the values $KEEP_LINE and $IGNORE_LINE can be exported. As an example, this is another program to filter out lines containing only whitespace:

use File::FilterFuncs qw(filters $IGNORE_LINE);

filters(source.txt,
sub { return $IGNORE_LINE unless /S/ },
dest.txt
);

<<less
Download (0.012MB)
Added: 2007-04-27 License: Perl Artistic License Price:
910 downloads
File::Drawing 0.01

File::Drawing 0.01


File::Drawing release, revise and retrieve contents to/from a drawing program module. more>>
File::Drawing release, revise and retrieve contents to/from a drawing program module.

SYNOPSIS

##########
# Subroutine interface
#
use File::Drawing qw(
dod_date dod_drawing_number number2pm pm2number obsolete
broken backup);

$date = dod_date($sec, $min, $hour, $day, $month, $year);
$drawing_number = dod_drawing_number( );

$pm = number2pm($drawing_number, $repository);
$drawing_number = pm2number($drawing_number, $repository);

$old_value = config( $option );
$old_value = config( $option => $new_value);
(@all_options) = config( );

obsolete($drawing_number, $repository);
broken($drawing_number, $repository);
($file, $backup_file) = backup($drawing_number, $repository, $dir);

######
# Class Interface
#
use File::Drawing;

$default_options = defaults(@options);

$old_value = $default_options->config( $option );
$old_value = $default_options->config( $option => $new_value);
(@all_options) = $default_options->config( );

$drawing = new File::Drawing($contents, $white_tape, $pod, $file_contents, $drawing_number, $repository);

$drawing = File::Drawing->retrieve($drawing_number, @options);

$error = $drawing->release(@options);

$error = $drawing->revise(@options);

$date = $drawing->dod_date($sec, $min, $hour, $day, $month, $year);
$drawing_number = $$drawing->dod_drawing_number( );

$pm = $drawing->number2pm($drawing_number, $repository);
$drawing_number = $drawing->pm2number($drawing_number, $repository);

$drawing->obsolete($drawing_number, $repository);
$drawing->broken($drawing_number, $repository);
($file, $backup_file) = $drawing->backup($drawing_number, $repository, $dir);

Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.

The File::Drawing program module uses American National Standards for drawings as a model for storing data. Commercial, governement and casual orgainizations have stored information over the centuries as drawings. Drawings probably evolved from the census that the Romans rulers, started back when Rome was a little frontier town. In other words, the practices of the drafting displines have evolved over time and have stood the test of time.

Any deviation must be a crystal clear advantage. Many of the practices are in place to avoid common and costly human mistakes that obviously a computerize drafting system will not make. A good approach is to make the computerized data structure optimum for computers and have the computer render the computerized data into a form that meets the drafting standards.

The File::Drawing program module, uses the Perl program module name as a drawing repository, drawing number combination. The contents of the drawing is contained in the program module file. The < File::Drawing > program module established methods to retrieve contents from a program module drawing file, create an Perl drawing object with the contents, and methods to release and revise the contents in a program module drawing file from a Perl drawing object. Other popular methods for computerize date are the SQL and XML. Perl has a wide range of program modules using these approach.

In this time in history, the Drawings are highly standardize and even subject to Internationl standarization agreements. The Drawing Sheet Size and Format conform to ANSI Y14.1-1975 or its successor. The drawing has a box with zone numbers running right to left alon the top and bottom, and zone letters running bottom to top along the sides. There is a section inside the box, lower right corner with the blocks for such things as the title, drawing number, current revision, authoriztion, and sheet number. There is an expandable four column table in the top right corner to record the revision history.

<<less
Download (0.063MB)
Added: 2006-06-22 License: Perl Artistic License Price:
1219 downloads
DateTime::Format::Strptime 1.0700

DateTime::Format::Strptime 1.0700


DateTime::Format::Strptime is a Perl module to parse and format strp and strf time patterns. more>>
DateTime::Format::Strptime is a Perl module to parse and format strp and strf time patterns.

SYNOPSIS

use DateTime::Format::Strptime;

my $Strp = new DateTime::Format::Strptime(
pattern => %T,
locale => en_AU,
time_zone => Australia/Melbourne,
);

my $dt = $Strp->parse_datetime(23:16:42);

$Strp->format_datetime($dt);
# 23:16:42



# Croak when things go wrong:
my $Strp = new DateTime::Format::Strptime(
pattern => %T,
locale => en_AU,
time_zone => Australia/Melbourne,
on_error => croak,
);

$newpattern = $Strp->pattern(%Q);
# Unidentified token in pattern: %Q in %Q at line 34 of script.pl

# Do something else when things go wrong:
my $Strp = new DateTime::Format::Strptime(
pattern => %T,
locale => en_AU,
time_zone => Australia/Melbourne,
on_error => &phone_police,
);

This module implements most of strptime(3), the POSIX function that is the reverse of strftime(3), for DateTime. While strftime takes a DateTime and a pattern and returns a string, strptime takes a string and a pattern and returns the DateTime object associated.

<<less
Download (0.025MB)
Added: 2007-05-17 License: Perl Artistic License Price:
890 downloads
HTML::FromMail::Format::OODoc 0.10

HTML::FromMail::Format::OODoc 0.10


HTML::FromMail::Format::OODoc is a Perl module that can convert messages into HTML using OODoc::Template. more>>
HTML::FromMail::Format::OODoc is a Perl module that can convert messages into HTML using OODoc::Template.

INHERITANCE

HTML::FromMail::Format::OODoc
is a HTML::FromMail::Format
is a Mail::Reporter

SYNOPSIS

my $fmt = HTML::FromMail->new
( templates => ...
, formatter => OODoc # but this is also the default
);

Convert messages into HTML using OODoc::Template. This is a simple template system, which focusses on giving produced pieces of HTML a place in larger HTML structures.

<<less
Download (0.024MB)
Added: 2006-08-15 License: Perl Artistic License Price:
1165 downloads
Audio File Library 0.2.6

Audio File Library 0.2.6


Audio File Library is a uniform API for accessing standard digital audio file formats. more>>
The Audio File Library provides a uniform and elegant API for accessing a variety of audio file formats, such as AIFF/AIFF-C, WAVE, NeXT/Sun .snd/.au, Berkeley/IRCAM/CARL Sound File, Audio Visual Research, Amiga IFF/8SVX, and NIST SPHERE. Supported compression formats are currently G.711 mu-law and A-law and IMA and MS ADPCM.

Key goals of the Audio File Library are file format transparency and data format transparency. The same calls for opening a file, accessing and manipulating audio metadata (e.g. sample rate, sample format, textual information, MIDI parameters), and reading/writing sample data will work with any supported audio file format. Likewise, the format of the audio data presented to the application need not be tied to the format of the data contained in the file.

The Audio File Library distributed under the GNU Library General Public License.
<<less
Download (0.36MB)
Added: 2005-04-14 License: LGPL (GNU Lesser General Public License) Price:
1655 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5