Re: Need simple perl script

2010-06-06 Thread Chas. Owens
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"

Re: Need simple perl script

2010-06-06 Thread Philip Potter
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

Need simple perl script

2010-06-06 Thread Mephistopheles
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/

Re: simple perl script on Windows

2007-01-19 Thread Dr.Ruud
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

Re: simple perl script on Windows

2007-01-18 Thread David Moreno Garza
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

Re: simple perl script on Windows

2007-01-18 Thread Mathew Snyder
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

Re: simple perl script on Windows

2007-01-18 Thread Rob Dixon
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

Re: simple perl script on Windows

2007-01-18 Thread Mathew Snyder
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

Re: simple perl script on Windows

2007-01-18 Thread Rob Dixon
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

Re: simple perl script on Windows

2007-01-18 Thread David Moreno Garza
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

Re: simple perl script on Windows

2007-01-18 Thread Tom Phoenix
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

Re: simple perl script on Windows

2007-01-18 Thread I . B .
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

Re: simple perl script on Windows

2007-01-18 Thread Mathew
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/^.*\

simple perl script on Windows

2007-01-18 Thread Mathew
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

A simple perl script

2005-08-12 Thread Stephen Liu
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

Re: Simple Perl Script

2003-02-20 Thread Lance
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

Re: Simple Perl Script

2003-02-18 Thread R. Joseph Newton
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

Re: Simple Perl Script

2003-02-18 Thread Rob Dixon
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

Re: Simple Perl Script

2003-02-18 Thread Paul
--- 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

Re: Simple Perl Script

2003-02-18 Thread Jenda Krynicky
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

RE: Simple Perl Script

2003-02-18 Thread Bob Showalter
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

RE: Simple Perl Script

2003-02-18 Thread Wagner, David --- Senior Programmer Analyst --- WGO
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

Simple Perl Script

2003-02-18 Thread James Parsons
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