Re: entering text within a file

2004-05-27 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: no thanks! but why are you setting ejectapes as an array and then calling it with @ instead of $? my @ejectapes = qw(/usr/local/bin/perld/exports); ($^I, @ARGV) = ('.bak', @ejectapes); instead of my @ejectapes = qw(/usr/local/bin/perld/exports); ($^I, @ARGV) = (

Re: entering text within a file

2004-05-27 Thread DBSMITH
ak', $ejectapes); Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams "JupiterHost.Net" <[EMAIL PROTECTED]> 05/27/2004 10:10 AM To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED], "John W. Krahn" <[EMAIL PROTECTED]> Subj

Re: entering text within a file

2004-05-27 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: the last mail was the solution! Thanks for the persistence! Glad it worked out! Just a couple more notes below to make it even better :) the code is to insert eject 0,0,0 string in front of the E string like so:eject0,0,0E4030 from a file

Re: entering text within a file

2004-05-27 Thread DBSMITH
upiterHost.Net" <[EMAIL PROTECTED]> 05/26/2004 05:40 PM To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED], "John W. Krahn" <[EMAIL PROTECTED]> Subject:Re: entering text within a file [EMAIL PROTECTED] wrote: > awesome I am makin

Re: entering text within a file

2004-05-26 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: I am still having issues with the output as it looks like this... eject 0,0,0 eject 0,0,0 eject 0,0,0 I need to insert eject 0,0,0 before the E string, like so: eject 0,0,0 E00xxx perl -mstrict -we 'my @x = qw(E12345 45678 E90987);for(@x) { s/(^E?\d{5})/eject\t0,0,

Re: entering text within a file

2004-05-26 Thread John W. Krahn
[ Top posting fixed ] [EMAIL PROTECTED] wrote: > > "John W. Krahn" <[EMAIL PROTECTED]> 05/25/2004 07:49 PM > > > > You can either use Perl's "in-place" edit feature or use a second file > > to write the data to. Using in-place edit would look something like > > this: > > > > #!/usr/local/bin/p

Re: entering text within a file

2004-05-26 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: awesome I am making progress. I used ".bak" instead of ' ' b/c I do not want to remove the file after $ ^ I the edit is done. BUT, I do not want to replace the E strings with the eject string instead I want to put the eject string in from of the E string and write

Re: entering text within a file

2004-05-26 Thread DBSMITH
ith OhioHealth IT UNIX / TSM / EDM Teams 614-566-4145 "JupiterHost.Net" <[EMAIL PROTECTED]> 05/26/2004 03:12 PM To: [EMAIL PROTECTED] cc: "John W. Krahn" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subject:Re: entering text within a fi

Re: entering text within a file

2004-05-26 Thread DBSMITH
now it is replacing ? thanks! Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams "JupiterHost.Net" <[EMAIL PROTECTED]> 05/26/2004 03:12 PM To: [EMAIL PROTECTED] cc: "John W. Krahn" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subjec

Re: entering text within a file

2004-05-26 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: ok does this s/^(?=E\d{5})/eject\t0,0,0\t\n/ while <>; say... from the beginning of the line match 0 or 1 E's with any digits then print ?=E is sort of odd, I think you mean E? so it is substituting the first part with the second part s/^E?\d{5}/eject\t0,0,0\t\n/ will ta

Re: entering text within a file

2004-05-26 Thread DBSMITH
/ EDM Teams "John W. Krahn" <[EMAIL PROTECTED]> 05/25/2004 07:49 PM To: [EMAIL PROTECTED] cc: Subject:Re: entering text within a file [EMAIL PROTECTED] wrote: > > All, Hello, > I am having some trouble figuring this out. I

Re: entering text within a file

2004-05-25 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > All, Hello, > I am having some trouble figuring this out. I want to enter some text > within a pre-existing file. Here is what the file would look like > > E00140 > E00141 > E00143 > . > . > . > > here is my code thus far > > #!/usr/local/bin/perl -w > use stric

entering text within a file

2004-05-25 Thread DBSMITH
All, I am having some trouble figuring this out. I want to enter some text within a pre-existing file. Here is what the file would look like E00140 E00141 E00143 . . . here is my code thus far #!/usr/local/bin/perl -w use strict; my $ejectapes = "/usr/local/bin/perld/exports"; open (ACSLS