Why don't we just agree to disagree and move on. You both know you have a
valid point, and yet there is valid reasons on both sides for having it the
way it is, and why in particular environments it's valid to have it one way
or the other.
On Tue, Oct 18, 2011 at 10:13 AM, Randal L. Schwartz
wrot
> "Shawn" == Shawn H Corey writes:
Shawn> On 11-10-14 02:08 AM, Randal L. Schwartz wrote:
>> Because this uses*my* environment when I run*your* Perl script.
>> That's broken.
Shawn> Then you should un-break your environment. I can help you if
Shawn> you're using Linux. If you're using Wind
> Because this uses *my* environment when I run *your* Perl script.
> That's broken.
> Hardcode the path. Or install it using any of the module tools, which
> will replace #!perl with the proper hardcoded local Perl path.
I also view this as a deployment problem which has probably been solved m
On 11-10-14 02:08 AM, Randal L. Schwartz wrote:
Because this uses*my* environment when I run*your* Perl script.
That's broken.
Then you should un-break your environment. I can help you if you're
using Linux. If you're using Windows, I'm sure there are many on the
list who can help.
--
Ju
> "Dermot" == Dermot writes:
Dermot> On 13 October 2011 03:07, Randal L. Schwartz
wrote:
>>> "Shawn" == Shawn H Corey writes:
>>
Shawn> #!/usr/bin/env perl
>>
>> Please. Don't.
Dermot> This is quite relevant for me at the moment. I have a couple of
Dermot> projects where I will n
May be this'll help? )
#!/usr/bin/perl
use strict;
use warnings;
die 'Usage: ' . __FILE__ . " file1[ file2...]\n" unless @ARGV;
my $ref_file = 'ref.txt';
my $new_file = 'new.txt';
open my $ref_fh, '<', $ref_file
or die "Failed to open reference file - $!\n";
my %limits_for;
while (<$ref_f
On 13 October 2011 03:07, Randal L. Schwartz wrote:
>> "Shawn" == Shawn H Corey writes:
>
> Shawn> #!/usr/bin/env perl
>
> Please. Don't.
This is quite relevant for me at the moment. I have a couple of
projects where I will not be using the system perl and I was under
the impression that u
> "Shawn" == Shawn H Corey writes:
Shawn> #!/usr/bin/env perl
Please. Don't.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessage
On 11-10-12 10:01 AM, Nathalie Conte wrote:
HI All,
I have 2 sets of files I want to compare,and I don't know where to start
to get what I want :(
I have a reference file ( see ref for example) with a chromosome name, a
start and a end position
Chr7 115249090 115859515
Chr8 25255496 29565459
Chr1
Hi Nathalie,
On Wed, 12 Oct 2011 15:01:15 +0100
Nathalie Conte wrote:
> HI All,
> I have 2 sets of files I want to compare,and I don't know where to start
> to get what I want :(
> I have a reference file ( see ref for example) with a chromosome name, a
> start and a end position
> Chr7115
HI All,
I have 2 sets of files I want to compare,and I don't know where to start
to get what I want :(
I have a reference file ( see ref for example) with a chromosome name, a
start and a end position
Chr7115249090115859515
Chr82525549629565459
Chr13198276698298299815
Ch
Aaron Rubinstein wrote:
>
>> Given just the idea of the data, can you improve on that?
>
> I bet I could!
I bet you could too :)
> It's interesting how my instinct, when trying to develop a programming
> solution, is to wrestle with the problem inside the context of the language.
> As a result
> Given just the idea of the data, can you improve on that?
I bet I could! It's interesting how my instinct, when trying to develop a
programming solution, is to wrestle with the problem inside the context of
the language. As a result, the solutions I come up with tend to be shaped
by my limited
On Sat, May 3, 2008 at 5:57 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> From: "Chas. Owens" <[EMAIL PROTECTED]>
>
> > On Sat, May 3, 2008 at 4:42 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> > snip
> > > > [stuff about how two arg open is more dangerous than three arg open
> > > And that
rubinsta wrote:
> Hello,
>
> I'm a Perl uber-novice and I'm trying to compare two files in order to
> exclude items listed on one file from the complete list on the other
> file. What I have so far prints out a third file listing everything
> that matches the exclude file from the complete file (
From: "Chas. Owens" <[EMAIL PROTECTED]>
> On Sat, May 3, 2008 at 4:42 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> snip
> > > [stuff about how two arg open is more dangerous than three arg open
> > And that means you were lucky. If the $file contained something like
> > "|rm -rf /" or "rm -rf
On Sat, May 3, 2008 at 4:42 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
snip
> > [stuff about how two arg open is more dangerous than three arg open
> And that means you were lucky. If the $file contained something like
> "|rm -rf /" or "rm -rf / |" ...
snip
Nah, you would be lucky if that wer
From: "Chas. Owens" <[EMAIL PROTECTED]>
> On Fri, May 2, 2008 at 10:44 AM, rubinsta <[EMAIL PROTECTED]> wrote:
> snip
> > Any thoughts as to why
> > some of the matches are getting missed?
> snip
>
> Not off hand. I will extract your code and do some tests. Can you
> send me y
On Fri, May 2, 2008 at 10:44 AM, rubinsta <[EMAIL PROTECTED]> wrote:
snip
> Any thoughts as to why
> some of the matches are getting missed?
snip
Not off hand. I will extract your code and do some tests. Can you
send me your data or is it sensitive?
snip
> Just out of beginner curiosity, why
Many thanks, Chas. These are all very helpful (and educational!)
suggestions. I adapted your example like so (specifying the all.txt
on the command-line):
#!/usr/bin/perl
use strict;
use warnings;
open my $ex, "<", "exclude.txt" or die $!;
open my $out, ">", "exTest.txt" or die $!;
my %exists;
On Thu, May 1, 2008 at 4:09 PM, rubinsta <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm a Perl uber-novice and I'm trying to compare two files in order to
> exclude items listed on one file from the complete list on the other
> file. What I have so far prints out a third file listing everything
>
Hello,
I'm a Perl uber-novice and I'm trying to compare two files in order to
exclude items listed on one file from the complete list on the other
file. What I have so far prints out a third file listing everything
that matches the exclude file from the complete file (which I'm hoping
will be a d
Jenda,
I want to which lines are different.
Thanks,
Jerry
Jenda Krynicky wrote:
> From: Jerry Preston <[EMAIL PROTECTED]>
>
> > I want to compare one file to another. Is it better to read the files
> > line by line into an array or and hash or what is the best and or
> > fastest? These file
From: Jerry Preston <[EMAIL PROTECTED]>
> I want to compare one file to another. Is it better to read the files
> line by line into an array or and hash or what is the best and or
> fastest? These files are less than 100 lines.
Depends on what do you mean by "compare".
Do you want to get the
[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 4:27 PM
> To: 'Jerry Preston'; begginners
> Subject: RE: comparing files
>
>
> On UNIX it's called diff. >8^P
>
> > -Original Message-
> > From: Jerry Preston [mailto:[EMAIL PROTECTED]]
>
On UNIX it's called diff. >8^P
> -Original Message-
> From: Jerry Preston [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 4:23 PM
> To: begginners
> Subject: comparing files
>
>
> I want to compare one file to another. Is it better to read
I want to compare one file to another. Is it better to read the files
line by line into an array or and hash or what is the best and or
fastest? These files are less than 100 lines.
Thanks,
Jerry
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
*laugh* - Thanks for the pointers and consider myself better learned. :)
Hmm ... now I better go & hunt down all those greps in my scripts...
Jason
If memory serves me right, on Tuesday 29 January 2002 13:26, Jeff 'japhy'
Pinyan wrote:
> On Jan 29, Jason Purdy said:
> >my ( @filea, @fileb, @in
On Jan 29, Jason Purdy said:
>my ( @filea, @fileb, @inAButNotInB, @inBButNotInA );
I don't see any hashes being used. This feels like it's going to be very
inefficient.
>open ( FILEA, shift ) || die "Cannot open 1st file: $!\n";
>@filea = ;
>close ( FILEA );
>
>open ( FILEB, shift ) || die "C
On Jan 29, [EMAIL PROTECTED] said:
>1- report any objects in File A that are not in File B
>2- report any objects that are in File B but not in File A
This sounds like the job for two hashes. It also happens to be in the FAQ
under the heading "How do I compute the difference of two arrays? How
Feel like I'm back in comp-sci, but this time, they'll actually let me use a
real language (don't get me started on "Turing" ;)).
I wrote this simple script that should work with 5.003...
Jason
#!/usr/bin/perl -w
# call this with 2 params, such as
# > diff.pl [file1] [file2]
use strict;
m
If you are just looking to see if X from file one is in file two, and vice
versa, you may want to look at p147 in the Cookbook. It's example is
comparing the hash keys of two seperate hashes.
If you place each line of your file into a hash and the other file in
another hash, and compare the to
I have two lists of objects in two files. I need a way to compare these two
files and:
1- report any objects in File A that are not in File B
2- report any objects that are in File B but not in File A
3- Restriction: I am not working with a modern version of Perl, I am
restricted to the followin
33 matches
Mail list logo