Hi all,
I want to write a script to
delete something from text file.
How can I do this? Could you
give a sample script.
Regards,
lonh
Craig Sharp wrote:
> Hi all,
>
>
>
> I have a file with lines that are in the following format:
>
>
>
> 20011219 074645 b03 3524 switch 10.3.xxx.xxx 3
>
>
>
> I need to do a substitution so that the line appears as:
>
>
>
> 20011219 074645 b03-3524-switch 10.3.xxx.xxx 3
>
>
>
> Not
In your test.pl,
system("test2.pl");
or
`test2.pl`;
-Bo
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Monday, January 07, 2002 1:24 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [Perl-unix-users] Calling a Perl Program W
Sorry for the newbie questionbut how do I include a perl program within
another perl program?
I have test.pl and I want to call within test.pl test2.pl.
Gregory J Toland
Sr. Systems Architect
CHM, Inc.
(301) 457-8058
[EMAIL PROTECTED]
___
Perl-Uni
--- Craig Sharp <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a file with lines that are in the following
> format:
>
> 20011219 074645 b03 3524 switch 10.3.xxx.xxx 3
>
> I need to do a substitution so that the line appears
> as:
>
> 20011219 074645 b03-3524-switch 10.3.xxx.xxx 3
Another
Well, looking at the pattern, it looks like you need to start your
substitution when the pattern matches 'bNN' and ends when it hits an IP
address, matching 'NN\.' or 'NNN\.'.
So, here's some (baby-talk ;)) code:
#!/usr/bin/perl
$line = "20011219 074645 b03 3524 switch 10.3.xxx.xxx 3";
# brea
Hi all,
I have a file with lines that are in the following format:
20011219 074645 b03 3524 switch 10.3.xxx.xxx 3
I need to do a substitution so that the line appears as:
20011219 074645 b03-3524-switch 10.3.xxx.xxx 3
Note the inclusion of the dashes.
Here is another