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 29.540.848 Times

File::Remote 1.17

  Date Added: April 05, 2010  |  Visits: 828

File::Remote

Report Broken Link
Printer Friendly Version


Product Homepage
Download (75 downloads)



File::Remote is a Perl module to read/write/edit remote files transparently. SYNOPSIS # # Two ways to use File::Remote # # First, the function-based style. Here, we can use the # special :replace tag to overload Perl builtins! # use File::Remote qw(:replace); # special :replace tag # read from a remote file open(REMOTE, "host:/remote/file") or die $!; print while (< REMOTE >); close(REMOTE); # writing a local file still works! open(LOCAL, ">>/local/file"); print LOCAL "This is a new line.n"; close(LOCAL); mkdir("host:/remote/dir", 0755); unlink("host:/remote/file"); unlink("/local/file"); # still works too! symlink("host:/remote/src", "host:/remote/dest"); chown("root", "other", "host:/remote/dir/file"); chmod(0600, "host:/remote/dir/file"); # # Next, the object-oriented style, if you dont want to # mess with the builtins. # use File::Remote; my $remote = new File::Remote; # Standard filehandles $remote->open(FILE, ">>host:/remote/file") or die $!; print FILE "Heres a line thats added.n"; $remote->close(FILE); # Create a new file and change its permissions $remote->mkdir("host:/remote/dir"); $remote->touch("host:/remote/dir/file"); # Move files around $remote->copy("/local/file", "host:/remote/file") or warn $!; $remote->move("host:/remote/file", "/local/file"); # Read and write whole files my @file = $remote->readfile("host:/remote/file"); $remote->writefile("/local/file", @file); # Backup a file with a suffix $remote->backup("host:/remote/oldfile", "save"); # Use secure connection methods my $secure = new File::Remote (rsh => "/usr/local/bin/ssh", rcp => "/usr/local/bin/scp"); $secure->unlink("/local/file"); $secure->rmdir("host:/remote/dir"); This module takes care of dealing with files regardless of whether theyre local or remote. It allows you to create and edit files without having to worry about their physical location on the network. If a file passed into a function is of the form host:/path/to/file, then File::Remote uses rsh/rcp (or ssh/scp, depending on how you configure it) to edit the file remotely. Otherwise, it assumes the file is local and passes calls directly through to Perls core functions. The nice thing about this module is that you can use it for all your file calls, since it handles both remote and local files transparently. This means you dont have to put a whole bunch of checks for remote files in your code. Plus, if you use the function-oriented interface along with the :replace tag, you can actually redefine the Perl builtin file functions. This means that your existing Perl scripts can automatically handle remote files with no re-engineering(!)..

Requirements: No special requirements
Platforms: Linux
Keyword: Fileremote Files Libraries Local Module New Perl Perl Module Programming Remote Files
Users rating: 0/10

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


FILE::REMOTE RELATED
Server Tools  -  Remote Files Server 2.5.2
With Remote Files Server you'll be able to manage all your files and enable the access to shared documents for your network peers and even via the Internet. Remote Files Server is special Windows software that provides simultaneous access to...
 
Libraries  -  Drupal::Module::Starter 0.06
Drupal::Module::Starter is a Perl module to create Drupal Module starter files. SYNOPSIS You probably dont want to use this module directly - you want to use the drupal-module-starter script in the scripts directory of the distribution use...
14.34 KB  
Libraries  -  DNS::ZoneParse 0.95
DNS::ZoneParse is a Perl module to parse and manipulate DNS Zone Files. SYNOPSIS use DNS::ZoneParse; my $zonefile = DNS::ZoneParse->new("/path/to/dns/zonefile.db", $origin); # Get a reference to the MX records my $mx = $zonefile->mx; #...
9.22 KB  
Libraries  -  MP3::Tag 0.9709
MP3::Tag is a Perl module for reading tags of MP3 audio files. SYNOPSIS use MP3::Tag; $mp3 = MP3::Tag->new($filename); # get some information about the file in the easiest way ($title, $track, $artist, $album, $comment, $year, $genre) =...
174.08 KB  
Libraries  -  Wx::Perl::Packager 0.07
Wx::Perl::Packager provides a module to assist packaging Wx based applications with PAR, ActiveState PerlApp / PDK and Perl A module to assist packaging Wx based applications with PAR, ActiveState PerlApp / PDK and Perl2Exe. All that is needed...
12.29 KB  
Libraries  -  File::Slurp 9999.12
File::Slurp is a Perl module for efficient reading/writing of complete files. SYNOPSIS use File::Slurp; my $text = read_file( filename ) ; my @lines = read_file( filename ) ; write_file( filename, @lines ) ; use File::Slurp qw( slurp )...
26.62 KB  
Libraries  -  Doc::Perlish 0.14
Doc::Perlish is a Perl module that contains Perl Documentation Tools. SYNOPSIS my $doc = Doc::Perlish->new( type => "POD", input => "source.pod" ); # simple conversions; my $html = $doc->to_html; # DOM-style interface; see...
56.32 KB  
Libraries  -  XML::PatAct::ToObjects 0.08
XML::PatAct::ToObjects is an action module for creating Perl objects. SYNOPSIS use XML::PatAct::ToObjects; my $patterns = [ PATTERN => [ OPTIONS ], PATTERN => "PERL-CODE", ... ]; my $matcher = XML::PatAct::ToObjects->new( Patterns =>...
31.74 KB  
Libraries  -  Test::WWW::Selenium 1.10
Test::WWW::Selenium is a Perl module to test applications using Selenium Remote Control. SYNOPSIS Test::WWW::Selenium is a subclass of WWW::Selenium that provides convenient testing functions. use Test::More tests => 5; use...
39.94 KB  
Libraries  -  OzDB 0.02
OzDB is a database Perl interface module for OzBot. SYNOPSIS use OzDB; The OzDB Perl module handles authentication and access control for the OzBot based utility bots. The basic database format is the authentication schema. This is based on...
12.29 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
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  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB