[Perl-unix-users] File Handler

2002-01-07 Thread lonh SENG
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

Re: [Perl-unix-users] Regex problem

2002-01-07 Thread $Bill Luebkert
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

RE: [Perl-unix-users] Calling a Perl Program Within the Middle of Another Perl Program

2002-01-07 Thread Zhou, Bo
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

[Perl-unix-users] Calling a Perl Program Within the Middle of Another Perl Program

2002-01-07 Thread gregory . john . toland
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

Re: [Perl-unix-users] Regex problem

2002-01-07 Thread Jim Angstadt
--- 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

Re: [Perl-unix-users] Regex problem

2002-01-07 Thread Jason Purdy
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

[Perl-unix-users] Regex problem

2002-01-07 Thread Craig Sharp
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