Skip Menu |

This queue is for tickets about the Compress-LZ4 CPAN distribution.

Report information
The Basics
Id: 88950
Status: rejected
Priority: 0/
Queue: Compress-LZ4

People
Owner: Nobody in particular
Requestors: opticyclic [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Script To Use Compress
Date: Tue, 24 Sep 2013 19:07:52 -0400
To: bug-Compress-LZ4 [...] rt.cpan.org
From: opticyclic <opticyclic [...] gmail.com>
Hi, I'm not really familiar with perl. How do I create a script to work with it? My first effort was this but it isn't right. #!/usr/bin/perl use Compress::LZ4; #my $in = $(cat $0); my $in = `cat $1`; my $dest = compress(compress($in)); my $file = "temp.zip"; # Use the open() function to create the file. unless(open FILE, '>'.$file) { # Die with error message if we can't open it. die "\nUnable to create $file\n"; } # Write some text to the file. #print FILE "Hello there\n"; #print FILE "How are you?\n"; print FILE $dest; # close the file. close FILE; I wanted to pass in the filename to compress to the script and ideally make the output the same name but with a .lz4 extension but I didn't even get as far as getting it to work with a fixed output name. Would you be able to give me an example that works? Thanks
On Tue Sep 24 19:08:25 2013, opticyclic@gmail.com wrote: Show quoted text
> Hi, > > I'm not really familiar with perl. > How do I create a script to work with it?
... Show quoted text
> I wanted to pass in the filename to compress to the script and ideally make > the output the same name but with a .lz4 extension but I didn't even get as > far as getting it to work with a fixed output name. Would you be able to > give me an example that works?
RT should only be used to report bugs or request feature enhancements. If you are having an issue with basic perl concepts, please seek help in a more appropriate forum, like perlmonks.org, stackoverflow, the #perl irc channel, etc.