On Sat, Jun 5, 2010 at 12:47, Mephistopheles wrote:
> 1. Run sdiff on file1 and file2--supress identical lines
> 2. OUtput column1 to outputfile1 and column2 to outputfile2
snip
You should be able to run sdiff with either the [open][1] function
open my $pipe, "-|", "sdiff", "file1", "file2"
On 5 June 2010 17:47, Mephistopheles wrote:
> 1. Run sdiff on file1 and file2--supress identical lines
> 2. OUtput column1 to outputfile1 and column2 to outputfile2
What have you tried so far? We can't correct your code if you don't
give us any code to correct.
--
To unsubscribe, e-mail: beginn
1. Run sdiff on file1 and file2--supress identical lines
2. OUtput column1 to outputfile1 and column2 to outputfile2
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
David Moreno Garza schreef:
> open FILE, 'H:\My Music\folderlist.txt';
> open DEST, '> H:\My Music\artists.txt';
> foreach my $line(readline FILE) {
> chomp;
> print DEST $1."\n" if $line =~ /\s*(.*)$/;
> }
> close FILE;
> close DEST;
Wouldn't it be great if, especially on this list, such
On Thu, 2007-01-18 at 21:42 -0500, Mathew Snyder wrote:
> Citlali had provided a regex that almost did what I wanted and then David gave
> me one that did exactly what I wanted.
Yay! We learn from everybody :-)
David.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
Rob Dixon wrote:
> Mathew Snyder wrote:
>> Rob Dixon wrote:
>>> Mathew wrote:
I have a file with a list of subfolders. The list was created using
dir
and each entry is like thus:
12/12/2005 04:38 AM A Perfect Circle
I then created a simple script th
Mathew Snyder wrote:
Rob Dixon wrote:
Mathew wrote:
I have a file with a list of subfolders. The list was created using dir
and each entry is like thus:
12/12/2005 04:38 AM A Perfect Circle
I then created a simple script that I hoped would eliminate everything
prior to the last
Rob Dixon wrote:
> Mathew wrote:
>> I have a file with a list of subfolders. The list was created using dir
>> and each entry is like thus:
>>
>> 12/12/2005 04:38 AM A Perfect Circle
>>
>> I then created a simple script that I hoped would eliminate everything
>> prior to the last bit
Mathew wrote:
I have a file with a list of subfolders. The list was created using dir
and each entry is like thus:
12/12/2005 04:38 AM A Perfect Circle
I then created a simple script that I hoped would eliminate everything
prior to the last bit of text which follows the big space
On Thu, 2007-01-18 at 11:44 -0500, Mathew wrote:
> open FILE, "H:\My Music\folderlist.txt";
>
> foreach my $line (readline FILE) {
> $line =~ s/^.*\s//g;
> open FILE2, "H:\My Music\artists.txt";
> print FILE2 $line . "\n";
> close FILE2;
> }
>
> close FILE;
I'd go w
On 1/18/07, Mathew <[EMAIL PROTECTED]> wrote:
open FILE, "H:\My Music\folderlist.txt";
Use forward slashes instead of backslashes in filename strings, even
on Windows. (Or, if you mean a true backslash, use two of them; a
single backslash is always magical in Perl.) And check the return
value
also keep open and close outside the loop.
you overwriting previously written lines.
open FILE2,"$file";
foreach @lines
{
print FILE2 $_;
}
close FILE2
cheers
On 1/18/07, Mathew <[EMAIL PROTECTED]> wrote:
Thanks. That likely will help. However, I still can't even get it to
perform any action
Thanks. That likely will help. However, I still can't even get it to
perform any action. I have it set to print to the screen right now but
it isn't creating any output.
Mathew
Guerrero, Citlali (GE, Corporate, consultant) wrote:
> Hi Mathew :
>
> This is what your regexp ($line =~ s/^.*\
I have a file with a list of subfolders. The list was created using dir
and each entry is like thus:
12/12/2005 04:38 AM A Perfect Circle
I then created a simple script that I hoped would eliminate everything
prior to the last bit of text which follows the big space.
open FILE, "H
Hi folks,
I'm prepared to write a simple perl scripts as follow
There are 25 commands executed in following sequence;
export LFS=/mnt/lfs
mount /dev/hda6 /mnt/lfs
mkdir -p $LFS
echo $LFS
/mnt/lfs (output)
/usr/sbin/chroot "$LFS" /tools/bin/env -i HOME=/root
TERM="$TERM" PS1='\u:\w\$ '
PATH=/b
Go buy, beg, borrow or steal ;-) 'Learning Perl'. It is the *best*
introductory programming book yet written. Not that I am biased or
anything...
"James Parsons" <[EMAIL PROTECTED]> wrote in message
725FADC37060D6118A02000255477DC00152FE8F@ETR_NT4">news:725FADC37060D6118A02000255477DC00152FE8F
James Parsons wrote:
> Ok here go's , I'm just starting to Learn Perl and it's a very slow
> process.
>
> I have this script the calculates the sum a bunch of numbers and prints
> the final number to file, but my problem is I would like the number to have
> a floating $sign but I'm sure how
James Parsons wrote:
> Ok here go's , I'm just starting to Learn Perl and it's a very slow
> process.
>
> I have this script the calculates the sum a bunch of numbers and
> prints the final number to file, but my problem is I would like the
> number to have a floating $ sign but I'm sure how
--- James Parsons <[EMAIL PROTECTED]> wrote:
> I have this script the calculates the sum a bunch of numbers and
> prints the final number to file, but my problem is I would like the
> number to have a floating $sign but I'm sure how do this
> printf ("%7.2f\n",$total);
> The number comes out
From: James Parsons <[EMAIL PROTECTED]>
> I have this script the calculates the sum a bunch of numbers and
> prints the final number to file, but my problem is I would like the
> number to have a floating $sign but I'm sure how do this
>
> printf ("%7.2f\n",$total);
>
>
> The number comes o
James Parsons wrote:
> Ok here go's , I'm just starting to Learn Perl and it's a very
> slow process.
Super! Lots of help available here. Suggestion #1: Use a meaningful subject
line; something like "Print floating dollar sign" would have been better
than &qu
James Parsons wrote:
> Ok here go's , I'm just starting to Learn Perl and it's a very slow
> process.
>
> I have this script the calculates the sum a bunch of numbers and
> prints the final number to file, but my problem is I would like the
> number to have a floating $sign but I'm sure how
Ok here go's , I'm just starting to Learn Perl and it's a very slow
process.
I have this script the calculates the sum a bunch of numbers and prints
the final number to file, but my problem is I would like the number to have
a floating $sign but I'm sure how do this
Any help would be grea
23 matches
Mail list logo