Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 34.379.934 Times

File::SmartNL 0.05

  Date Added: May 13, 2010  |  Visits: 819

File::SmartNL

Report Broken Link
Printer Friendly Version


Product Homepage
Download (78 downloads)



File::SmartNL is a slurp text files no matter the New Line (NL) sequence. SYNOPSIS ##### # Subroutine Interface # use File::SmartNL qw(config fin fout smartnl); $old_value = config( $option ); $old_value = config( $option => $new_value); (@all_options) = config( ); $data = smart_nl($data); $data = fin( $file_name, @options ); $char_count = fout($file_name, $data, @options); ###### # Object Interface # use File::SmartNL; $default_options = File::SmartNL->default(@options); $old_value = $default_options->config( $option ); $old_value = $default_options->config( $option => $new_value); (@all_options) = $default_options->config( ); $data = File::SmartNL->smart_nl($data); $data = File::SmartNL->fin( $file_name, @options ); $char_count = File::SmartNL->fout($file_name, $data, @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. Different operating systems have different sequences for new-lines. Historically when computers where first being born, one of the mainstays was the teletype. The teletype understood ASCII. The teletype was an automated typewriter that would perform a carriage return when it received an ASCII Carriage Return (CR), 15, character and a new line when it received a Line Feed (LF), 12 character. After some time came Unix. Unix had a tty driver that had a raw mode that sent data unprocessed to a teletype and a cooked mode that performed all kinds of translations and manipulations. Unix stored data internally using a single NL character at the ends of lines. The tty driver in the cooked mode would translate the New Line (NL) character to a CR,LF sequence. When driving a teletype, the physicall action of performing a carriage return took some time. By always putting the CR before the LF, the teletype would actually still be performing a carriage return when it received the LF and started a line feed. After some time came DOS. Since the tty driver is actually one of the largest peices of code for UNIX and DOS needed to run in very cramp space, the DOS designers decided, that instead of writing a tailored down tty driver, they would stored a CR,LF in the internal memory. Data internally would be either text data or binary data. Needless to say, after many years and many operating systems about every conceivable method of storing new lines may be found amoung the various operating systems. This greatly complicates moving files from one operating system to another operating system. The smart NL methods in this package are designed to take any combination of CR and NL and translate it into the special NL seqeunce used on the site operating system. Thus, by using these methods, the messy problem of moving files between operating systems is mostly hidden in these methods. By using the fin and fout methods, text files may be freely exchanged between operating systems without any other processing. The one thing not hidden is that the methods need to know if the data is text data or binary data. Normally, the assume the data is text and are overriden by setting the binary option. Perl 5.6 introduced a built-in smart nl functionality as an IO discipline :crlf. See Programming Perl by Larry Wall, Tom Christiansen and Jon Orwant, page 754, Chapter 29: Functions, open function. For Perl 5.6 or above, the :crlf IO discipline my be preferable over the smart_nl method of this program module..

Requirements: No special requirements
Platforms: Linux
Keyword: Carriage Return Cr Data Dos Lf Line New New Line No Matter Operating Operating Systems Options Smartnl Text Text Files
Users rating: 0/10

License: Freeware Size: 83.97 KB
USER REVIEWS
More Reviews or Write Review


FILE::SMARTNL RELATED
File Converters  -  EOL Converter 1.0.0
EOL Converter is an utility to convert text file line endings to Windows/Dos(CRLF), Unix/Linux(LF) or Macintosh(CR) format. It is very useful for writing and reading text files in different OSes. EOL Converter automatically detects the EOL format...
406.23 KB  
Development Editors  -  JAG CrLf 2.1
On DOS/Windows system line breaks are represented by the characters Carriage-Return and Line-Feed, on UNIX/Linux systems only by the character Line-Feed, on the Macintosh again only the character Carriage-Return is used. Because many programs...
345 KB  
Development Editors  -  Unix <-> Windows Text Converter 0.3b
Unix Windows Text Converter is a simple Windows Shell Extension that converts text files from DOS to Unix format (New Line format from CRLF to LF) and vice versa.
285 KB  
Utilities  -  Active@ Kill Disk - Hard Drive Eraser 2.0
Active@ KillDisk is a quality security application that destroys data permanently from any computer that can be started using a DOS floppy disk. Access to the drive's data is made on the physical level via the Basic Input-Output Subsystem (BIOS),...
252 KB  
Utilities  -  MISPBO Data Recovery 1.1
MISPBO Data Recovery allows you to recover your lost files, no matter how they were deleted. Using powerful bit-by-bit scanning methods, you can be sure to get your files back quickly and easily.
1.44 MB  
Utilities  -  Ultimate Data Recovery 5.0
Ultimate Data Recovery allows you to recover your lost files, no matter how they were deleted. Using powerful bit-by-bit scanning methods, you can be sure to get your files back quickly and easily.
1.16 MB  
Word Processing  -  MOJICOCO 1.1+
MOJICOCO - MoJi Code Converter (charset converter) is a freeware for converting text from one character encoding to another character encoding and for changing linefeed code between Windows(CR-LF), Mac(CR) and Linux(LF). MOJICOCO can support...
135 KB  
MS Office Add-Ins  -  CodeTwo Outlook Export 1.2.5
CodeTwo Outlook Export is an easy-to-use free tool for quick and advanced export of data from Microsoft Outlook to CSV text files. The program allows exporting much more data than offered by the built-in export feature in Outlook, allowing the...
1.05 MB  
Card Games  -  NetSolitaire 2003 - Free Online Solitaire Card Games 3.1
NetSolitaire 2003 is a collection of six Solitaire Card Games: Canfield, Fifteens, FreeCell, Golf, Klondike and Pyramid. Each solitaire has more than nine trillion (9,999,999,999,999) possible games to play, so you play a new game no matter how...
675 KB  
E-Commerce  -  Multiple File Search and Replace 2.0
With the help of this program, you can quickly find and replace text, correct html code and hyperlinks in multiple file, add new links or re-format the design of the entire site. Software extremely useful in editing of multiple html and text...
342.51 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB