Re:Regexp needed

2002-05-23 Thread Jorge Goncalvez
Hi, i have this: open INFILE, "< $_Globals{SYSLOG}" or die $!; #ModifiedFile(); while () { if (/([0-9a-z:]+)\s*via eth0)/) { $_Globals{MAC_ADDR} = $1; } } And my file is like this: . LOG_INFO : BOOTREQUEST from 00:80:9f:2e:0f:9c via eth0 .

Re:Win32::EventLog

2002-05-21 Thread Jorge Goncalvez
Hi, I wanted to delete some entries in The NT EventLog in the category Application: I have this code: use Win32::EventLog; use GetMyRegPath; my $CMPath = GetMyRegPath::GetCygwinMountsPath(); use Time::CTime; my ($Event, @timearray, $filename, $day, $month, $directory); # Where do you want

Re:regexp needed

2002-05-14 Thread Jorge Goncalvez
Hi, I have a file like this: ... SceInfEveryone = "Everyone" SceInfGuests = "Guests" SceInfGuest = "Guest" SceInfPowerUsers = "Power Users" SceInfPrintOp = "Print Operators" .. And I wanted to extract Guest (without the quotes)i tried this: my $HISEFILE= "c:/hisecdc.inf"; ope

Re:Delete a line and replace

2002-05-13 Thread Jorge Goncalvez
Hi, i have this file /etc/passwd like this: Everyone:*:0:0:,S-1-1-0:: SYSTEM:*:18:18:,S-1-5-18:: Administrators:*:544:544:,S-1-5-32-544:: Administrator:unused_by_nt/2000/xp:500:513:U-LININF54\Administrator,S-1-5-21-175 7981266-2139871995-725345543-500:/home/Administrator:/bin/bash anonymous:unus

RE:Regexp correction

2002-04-29 Thread Jorge Goncalvez
Hi, i have this code : opendir(DIR,"$_Globals{CDROM}:/DHS3MGR/$_Globals{TEL_VERSION}/DHS3Linux"); foreach (readdir(DIR)){ unless (/([Comm]+)/){ $box3->insert('end', $_); } } closedir(DIR); I wanted to have all that there is in DIR except the directory C

Re:regexp needed

2002-04-26 Thread Jorge Goncalvez
HI, I have a file like this: . 1015322638: in.tftpd : Win32 Process Id = 0xBF : Cygwin Process Id = 0xBF : RRQ from 192.40.54.42 filename /bootp/linux/4.0/alize/initrd.img (in.tftpd) .. And I wanted to match what is between from and filename ie 192.40.54.42 and what comes after filema

Re: Win32::TieRegistry

2002-04-23 Thread Jorge Goncalvez
Hi, i have this snippet (perl module) which uses Win32::registry(obsolete) but it didn't worked very well,I wonder how to get his job with Win32::tieRegistry. package NIC98; require Win32::Registry; sub GetNICName() { my $Register = "System\\CurrentControlSet\\Services\\Class\\Net\\";

Re:insert in a browseentry

2002-04-16 Thread Jorge Goncalvez
Hi, I have this: opendir(DIR,"$_Globals{CDROM}:/DHS3MGR/$tel_version/DHS3Linux"); foreach (readdir(DIR)){ unless (/([Comm]+)/){ $box3->insert('end', $_); } $box3 is a browse entry. It works fine but My problem is there is a file under DHS3MGR and not only a

RE:search an executable in path

2002-04-12 Thread Jorge Goncalvez
HI, I wanted to know if the Win32 executable net.exe is on Path. How can I do this in Perl? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:Ip address

2002-04-10 Thread Jorge Goncalvez
Hi, I tried to get the IP address in a Win98 machine I made a perl module and I put it in /site/lib with .pm extension. it is Registry98.pm But I have this error: Can't call method Open of a undefined value at Registry98.pm line 22 Why? Thanks Registry98.pm Description: Registry98.pm -- T

RE:How to remove 3 lines from a file

2002-04-08 Thread Jorge Goncalvez
Hi, I have a file like this: . # PXE Class vendor-class "PXEClient" { default-lease-time 1800; max-lease-time 1800; option dhcp-class-identifier "PXEServer"; filename "/bootp/linux/3.0/alize/startup.txt"; option vendor-encapsulated-options

RE:long path and short Path

2002-03-26 Thread Jorge Goncalvez
Hi, I wonder if Perl under windows know short path like dos with tildes on it. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:how to pass 2 variables

2002-03-13 Thread Jorge Goncalvez
Hi, I have this but it is a bit repeating I wonder how to pass 2 variables and use only function createScut.My code: my $path="$RegValue\\InstallOXE.lnk"; &createScut($path); my $path2="$RegValue\\remove.lnk"; &createScut2($path2);I

RE:Win32::Shortcut

2002-03-13 Thread Jorge Goncalvez
Hi, I use Win32::Shortcut with a perl /tk apllication to make a shortcut on the windows Desktop it works but when I double click my icon my application get a littele time to come and I wonder it is possible to add a hourglass when i double click my icon to make waiting the user. thanks . --

re:Regexp needed

2002-03-05 Thread Jorge Goncalvez
hi, i have this: my ($Path) = $MountsPath =~ /(.+?)cygwin/; but I wanted to get rid of the "/". because $MountsPath could be c:/cygwin or c:/xyz/cygwin or c:/xyz/zyx/cygwin and i wanted $Path = c: or c:/xyz or c:/xyz/zyx . And now $Path= c:/ or c:/xyz or c:/xyz/zyx. How can I do ? thanks. -- T

Re:Create a package

2002-03-05 Thread Jorge Goncalvez
Hi, I wanted to create a package like this: package GetMyRegPath; use Win32::Registry; sub GetCygwinMountsPath(){ my %Vals = (); my $RegPath = "SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/"; $main::HKEY_LOCAL_MACHINE->Open($RegPath, my $MountsKey) || die "Couldn't open $RegPath\n"; $

Re:Interpreting variable

2002-02-27 Thread Jorge Goncalvez
Hi, I have this snippet: sub GetCygwinMountsPath(){ ... } my $CMPath = GetCygwinMountsPath(); print ("The path is: $CMPath"); system(q{perl -i.orig -pe "s!/cygdrive/c!/!g" $CMPath/cygwin/etc/passwd}); but in th elast line $CMPath seems not to be interpreted althought $CMPath ="c:/". Why?

Re:Regexp help

2002-02-18 Thread Jorge Goncalvez
Hi, I need some help to have a regexp which could replace : by - in this code: my $cmd="arp -s $ipadress $_Globals{MAC_ADDRESS}"; system($cmd); actually $_Globals{MAC_ADDRESS} is formatted like this :XX:XX:XX:XX:XX:XX and i wanted to put it like this: XX-XX-XX-XX-XX-XX How can i do this thanks

Re:a better Perl way

2002-02-15 Thread Jorge Goncalvez
Hin I have this piece of code and i wanted to make it simpler and shorter Yhanks my $Range1 = $1 . ($2 + 1) if $IPREAL[0] =~ /^(.*\.)(.+)$/; my $Range2 = $1 . ($2 + 1) if $IPREAL[1] =~ /^(.*\.)(.+)$/; my $Range3 = $1 . ($2 + 2) if $IPREAL[0] =~ /^(.*\.)(.+)$/;

Re:pl2bat issue

2002-02-13 Thread Jorge Goncalvez
Hi, I tried to make an .bat of a .pl file thanks to pl2bat to execute it from both Windows NT and Win 9x. But when i double clicked it on NT it works but on Win9x it fails and i have the following: Command or filename incorrect In the header and the finish of my file i have: @rem = '--*-Perl-

RE:pidof a process

2002-02-07 Thread Jorge Goncalvez
Hi, Iw onder if there is a way to obtain the PID of a process with perl? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:Kill a process

2002-02-07 Thread Jorge Goncalvez
HI, I wanted to kill a process INETD by code:by hand in the cygwin bash i tried this: ps |awk '/INETD/{print $1}'|xargs kill and it works, now i wanted to do it by Perl code: I tried: system(" c:\\cygwin\\bin\\bash.exe('ps |awk '/INETD$/{print $1}|xargs kill')") or system("c:\\cygwin\\bin\\ps.exe

Re:A more perlish way

2002-02-06 Thread Jorge Goncalvez
Hi, I have this : my $program_path = "c:\\cygwin\\bootp\\linux"; my $Symlink="$program_path\\install.lnk"; my $Symlink2="$program_path\\linux.ram.lnk"; my $Symlink3="$program_path\\alize\\install.lnk"; my $Symlink4="$program_path\\alize\\startup.txt.lnk"; i

Re:How to delete a symlink

2002-02-06 Thread Jorge Goncalvez
Hi, I wanted to verify if a symlink exists and delete it if it exists My code is: my $program_path = "c:\\cygwin\\bootp\\linux"; my @program = ( "$program_path\\$_Globals{LX_VERSION}", "$program_path\\install", "$program_path\\linux.ram", "$program_path\\alize\\ins

RE:Destroy a window

2002-01-30 Thread Jorge Goncalvez
Hi, I have a perl tk (in Windows9X) application which contains 2 windows. What I would like to do is when i click the cross(to destroy the window) of the first window to destroy also the another window. Thanks. I tried this: MainLoop; $_Globals{POPUP_WINDOW}->destroy; $_Globals{TOP_

Re:foreach issue

2002-01-29 Thread Jorge Goncalvez
Hi I have this: $but->configure(-state=>$state); $Entry->configure(-state=>$state); $box->configure(-state=>$state); $box2->configure(-state=>$state); $box3->configure(-state=>$state); and I wanted to simplify it by @configure=("$but","$Entry","$box","$box2","$box3

Re:What's wrong with this?

2002-01-28 Thread Jorge Goncalvez
hi, I have this code: use IO::Socket; $port=21; $sock = IO::Socket::INET->new(PeerAddr =>'localhost', PeerPort => $port, Proto => 'tcp') ; die &inetdconf unless ($sock); my $cmd4=" net stop inetd && net start inet

Re: Re:What's wrong with this?

2002-01-24 Thread Jorge Goncalvez
good it works thanks for your precious tips. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Re:What's wrong with this?

2002-01-24 Thread Jorge Goncalvez
Humm It don't work syntax error at regedit3.pl line 10, near "%rkey(" it seems impossible to create a hash like this.. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Re:What's wrong with this?

2002-01-24 Thread Jorge Goncalvez
it still not working i tried this: use Win32::Registry; my $Register ="Software"; my $Register2=".DEFAULT\\Software"; my $hkey; $HKEY_LOCAL_MACHINE->Open($Register,$hkey)|| die $!; $hkey->DeleteKey("Cygwin2"); $hkey->Close(); $HKEY_CURRENT_USER->Open($Register,$hkey)|| die $!; $hkey->DeleteKey("Cy

Re:What's wrong with this?

2002-01-24 Thread Jorge Goncalvez
Hi, I have this: #!/usr/local/bin/perl -w use Win32::Registry; my $Register ="Software"; #my $Register2=".DEFAULT\\Software"; my $hkey; my @array= qw($HKEY_LOCAL_MACHINE $HKEY_CURRENT_USER ) ; foreach (@array) { $_=>Open($Register,$hkey)|| die $!; $hkey->DeleteKey("Cygwin2");

Re:IO::Socket::Inet

2002-01-22 Thread Jorge Goncalvez
Hi, i have this use IO::Socket; $port=21; $server="155.132.48.23"; #$server="192.40.54.41"; $sock = IO::Socket::INET->new(PeerAddr =>$server, PeerPort => $port, Proto => 'tcp') ;

Re:How to pass arguments

2002-01-22 Thread Jorge Goncalvez
hi, I have the following code: . sub MakeSixthEntry() { $box = $_Globals{POPUP_FRM}->BrowseEntry( -variable => \$_Globals{LX_VERSION}, -choices =>\@IPREAL, -browsecmd =>\&MakeEth, -listwidth

Re:How to make it more perlish

2002-01-18 Thread Jorge Goncalvez
Hi, I have this piece of code and i wanted to simplify it and make it more perlish. thanks &cbkRedrawLink() sub cbkRedrawLink() { my $PROG="c:\\OXE\\cygwin\\bootp\\linux\\$_Globals{LX_VERSION}"; my $PROG2="c:\\OXE\\cygwin\\bootp\\linux\\install"; my $PROG3="c:\\OXE\\cygwi

RE:Perl tk window issue

2002-01-17 Thread Jorge Goncalvez
Hi,I have a perl tk script under windows where i refresh and update some widget in a window, i must destroy and redraw the window to have the modifications updated. But with this method every time the window is called (so destroyed and redrawed) the window goes to the left top corner of the sc

Re:detect the path of a directory

2002-01-15 Thread Jorge Goncalvez
Hi,first i would like to thanks those who already helped me. I am under Windows and What I wanted is to detect where a directory is stored(in fact I wanted his path, like for exemple I wanted to detect where the directory OXE is,and i wanted his path that could be c:/OXE, or D:/OXE, Or E:/OXE

Re:Regex improvment needed

2002-01-15 Thread Jorge Goncalvez
Hi, I have this code to parse a file and get the hardware address: sub ParseInitDhcpdconf() { open VIEUX,"$_Globals{DHCPDCONF}" or die "je ne peux ouvrir $_Globals{DHCPDCONF} :$!"; while () { if (/hardware ethernet /) { $_=(split/\{/)[1];

Re:How to know if a symlink exists

2002-01-14 Thread Jorge Goncalvez
Hi, I wanted to do this: ln -s X Y but unless it don't already exists? How can I do this in Perl? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re:IP address from the registry

2002-01-10 Thread Jorge Goncalvez
Hi, Is there a way to obtain the IP address from the registry in Both Windows 98 and NT with Perl moduls. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[PBML] RE: Extract a value of a key into a hash

2002-01-10 Thread Jorge Goncalvez
Hi, I have this code: #!/usr/local/bin/perl -w use Win32::Registry; my %RegType = ( 0 => 'REG_0', 1 => 'REG_SZ', 2 => 'REG_EXPAND_SZ', 3 => 'REG_BINARY', 4 => 'REG_DWORD',

Re:Regexp and lower case

2002-01-10 Thread Jorge Goncalvez
Hi, I have this: if (/hardware ethernet /) { $_=(split/\{/)[1]; s/[^\d:A-F]//g; # remove anything not 0..9,A..F #print "$_\n"; } It works but I dont

RE:Parsing and regexp

2002-01-09 Thread Jorge Goncalvez
Hi, I made a parsing of a file which contains : this: Adresse IP. . . . . . . . . : 155.132.48.23 like this to obtain the Ip adress. if ($_ =~/Adresse IP/) { $_ =~ s/.+://; $Subnet=$_; push @IPREAL, $_; $_=~ s

RE:how to delete all keys in the regentry

2002-01-04 Thread Jorge Goncalvez
Hi, I wonder how to delete for exemple all keys that contains "test1" and "test2" from the Windows registry with Perl. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:Perl Tk issue

2001-12-27 Thread Jorge Goncalvez
Hi, I wonder if the method update works on Windows because it seems not to work, i must destroy my application and redraw it to have the variables updated when for exemple a variable is associated at a button . Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

Re:Count number of characters

2001-12-17 Thread Jorge Goncalvez
How can I count the number of characters of a string ? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:Need regex

2001-12-17 Thread Jorge Goncalvez
Hi, I wanted to have the first 5 elements of a scalar, like for exemple: my $number= E14011 my number2=E1401 How can i do this in Perl, thanks? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:A more Perlish way to do this

2001-12-13 Thread Jorge Goncalvez
Hi, I wanted to do this in a better Perlish Way: my $Range1 = $1 . ($2 + 10) if $IPREAL[0] =~ /^(.*\.)(.+)$/; my $Range2 = $1 . ($2 + 10) if $IPREAL[1] =~ /^(.*\.)(.+)$/; my $newline2= "subnet $IP[0] netmask 255.255.255.0{range dynamic-bootp $IPREAL[0] $Range1;}"; my $newline3= "subnet $IP[1]

Re:How to make a local variable a global variable in Perl

2001-12-12 Thread Jorge Goncalvez
Hi I have this code: ... sub MakeEth() { unless ($_Globals{NICIP_ADRESS}==$IPREAL[0]) { $_Globals{ETH_NETIF} eq "eth0"; } else{ $_Globals{ETH_NETIF} eq "eth0:1"; } } ... sub StartDhcp() { my $_cmd = $_Os{$_Globa

RE:Regex help

2001-12-07 Thread Jorge Goncalvez
I have this line in a file : host clin09 { hardware ethernet 00:80:9F:2E:3F:5E I have this code: While . if ($line =~ /^host clin09/){ system(q{perl -i.orig -pe "s/00:80:9F:2E:3F:5E/$_Globals{MAC_ADDRESS}/" c:\\cygwin\\etc\\dhcpd\\dhcpd.conf}) or die; } It

RE:Write to a file problem

2001-12-07 Thread Jorge Goncalvez
HI, I have a file which ends by: host clin09 {hardware ethernet 00:80:9F:2E:3F:5E; filename "/bootp/linux/pre3.1/alize/startup.txt";} } I have a perl tk application where a user types a MAc Adress in an entry the variable is $_Globals{MAC_ADDRESS} . I wanted to replace what's come after hardw

RE:how to patch a file

2001-12-06 Thread Jorge Goncalvez
Hi, I wanted to patch a file and I have this: system(perl -i.rig -pe 's!/home/ftp!/!g' c:\cygwin\etc\passwd) it fails when I put in a script but it succeed if i run it by hand in a bash. Why? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

RE:delete the last 3 lines of a file

2001-12-06 Thread Jorge Goncalvez
Hi, I have a file which I write to it like this it ends by: host clin09 {hardware ethernet 00:80:9F:2E:3F:5E; filename "/bootp/linux/pre3.1/alize/startup.txt";} } What I wanted to do is to delete this 3 end lines before to write to it, How can I do This in Perl? -- To unsubscribe, e-

RE:how to patch a file in Perl

2001-12-04 Thread Jorge Goncalvez
Thanks for all your previous help. now I wonder how to patch a file in Perl: There is my file: c:/cygwin/etc/passwd contains: Exemple of /etc/passwd : Tout le monde:*:0:0:,S-1-1-0:: SYSTEM:*:18:18:,S-1-5-18:: Administrateurs:*:544:544:,S-1-5-32-544:: Administrateur::500:513:,S-1-5-21-733626998-

RE:create an NT user with Perl

2001-12-04 Thread Jorge Goncalvez
HI, I wonder if there is a way to create an NT user with Perl? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:What's wrong with unlink?

2001-12-04 Thread Jorge Goncalvez
I tried : #!/usr/bin/perl my ($_path) = "c:/EventLogs/"; unlink <$_path/*> if -r $_path; But it still not working, I have 2 files under the directory when I run this script they are always here? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR

RE:Whats wrong with unlink?

2001-12-04 Thread Jorge Goncalvez
Hi, I wanted to delete all files under a directory but not the directory I tried this: my ($_path) = "c:/EventLogs/"; unlink $_path if -r $_path; But it didn't delete teh files which are under the directory Eventslogs Why? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE:delete all files under a directory

2001-12-03 Thread Jorge Goncalvez
Hi, I wonder How to delete all files under a directory in Perl Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:Delete all event in th even tlog

2001-12-03 Thread Jorge Goncalvez
I use the WIn32::EventLog and I wonder how to delete all event logs elements I have this code: #!/usr/local/bin/perl -w use Win32::EventLog; use File::stat; use File::Find; use strict; my ($Event, @timearray, $filename, $day, $month, $directory, $logfile, $fileage); my $retrycount = 0; #

Re:2 last number with a regex

2001-11-29 Thread Jorge Goncalvez
How can I check the last 2 number of an IP adress and increment it by 10. for exemple: $IP="192.40.54.41" Th elast 2 number is 41 i increment it by 10. $IP1="192.40.54.51" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: a little help in autoincrement IP addresses

2001-11-29 Thread Jorge Goncalvez
I wanted to print this in a file: subnet $var1 netmask 255.255.255.0{range dynamic-bootp $var2 $var3; } $var1,$var2,$var3 are IP adress. I do it and It works but now I wanted to do this: In fact I wanted for exemple:$var2="192.40.54.n" and $var3="192.40.54.n+10" How can I do this in Perl Tha

RE:Regex problem

2001-11-29 Thread Jorge Goncalvez
Hi, I have this code: $_Globals{IPCONFIG} = "C:/ipconfig.txt"; open (IPCONF,"< $_Globals{IPCONFIG}") or die "je ne peux ouvrir $_Globals{IPCONFIG} :$!"; @ten=; close IPCONF; foreach(@ten){ chomp(); if ($_ =~/Adresse IP/) { $_ =~ s/.+://;

RE:parent window in Perl TK

2001-11-28 Thread Jorge Goncalvez
Hi, I wonder if it is possible to create a new window(children) that could herit all variables of a parent window in Perl TK under Windows . So how can we do? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:help on Regex

2001-11-27 Thread Jorge Goncalvez
Hi I have this: my $ip="192.40.54.41"; $ip=~ s/(\d+\.\d+)\.(\d+\.\d+)/$1\.0/; print $ip; But It didn't work it displays 192.40.0 and I wanted to display 192.40.54.0. Why? thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:How to print and go to the next line

2001-11-27 Thread Jorge Goncalvez
Hi, I have this: print NOUVEAU $newline2\n or die "je ne peux écrire dans $nouveau : $!\n"; But it prints but didn't go to the next line(\n seems to be ignored) Why? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:delete a line of a file

2001-11-26 Thread Jorge Goncalvez
Hi, I would like to parse a file and delete the entire line if it begins with subnet. How can I do this in Perl? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re:How to get rid of the last Ip number with a regex

2001-11-26 Thread Jorge Goncalvez
Hi, I have this: open (IPCONF,"< $_Globals{IPCONFIG}") or die "je ne peux ouvrir $_Globals{IPCONFIG} :$!"; @ten=; close IPCONF; foreach(@ten){ chomp(); if ($_ =~ /Adresse IP/) { $_ =~ s/.+://; push @Ip,$_; }

Re:slash issue on a regex

2001-11-22 Thread Jorge Goncalvez
Hi, I have this: $buf=~(/d:/dhs3mgr/e1401/dhs3linux/fr/cpiofile/) but it didn't work.How can i do to escape the /. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:disable a frame

2001-11-20 Thread Jorge Goncalvez
Hi, How can I do to disable a frame which contains some widget in it in Perl TK? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:Kill a process

2001-11-16 Thread Jorge Goncalvez
Hi, I wonder how can I know if a process for exemple dhcpd is running and if it is how can I kill it in Perl. Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re:Win32::EventLog

2001-11-15 Thread Jorge Goncalvez
HI, I am using a script with Win32::EventLog on NT but I wonder if it is possible when I init my application to del all logs that are in the Event Log in the "directory" "Application" of the Event Log. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

RE:regex with /

2001-11-14 Thread Jorge Goncalvez
I have this: if($buf=~ qw(/bootp/linux/alize/tel/dhs3linux/fr/cpiofile/){ $_Globals{PROGRESS_VALUE}=100; } but it didn't work? why? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:Perl & rename File

2001-11-14 Thread Jorge Goncalvez
Hi,I have a perl tk application that create a file c:/cygwin_syslog.txt. I have this file c:/cygwin_syslog.txt, How I can do to verify if this file exists at the init of my application, if it exists I would rename it in c:/cygwin_syslog.bck0, and recreate one with the same name ie cygwin_syslog.

RE:Strings concatenation

2001-11-09 Thread Jorge Goncalvez
Hi, I have this: my $_cmd = $_Os{$_Globals{OS}}{DHCPD} ; system($_cmd) or Error("DHCPD"); it works but i would have this my $_cmd = $_Os{$_Globals{OS}}{DHCPD} . $eth; $eth is a variable that could be for exemple $cmd=dhcpd eth0 Thanks. -- To unsubscribe, e-mail: [EMAIL PROTEC

RE:Radio Button & Array

2001-11-09 Thread Jorge Goncalvez
Fist of all thanks for your previous help it really helps me. Hi, How can do this in Perl TK: I have a radio button with 2 choices Intel or 3Com in a menu.(it is $after[$_]; But this can be variable it depends (others choice with anothers strings could be possible). How can i do this if the us

RE:What's wrong in this code

2001-11-08 Thread Jorge Goncalvez
Hello, i have this: open (IPCONF,"< $_Globals{IPCONFIG}") or die "je ne peux ouvrir $_Globals{IPCONFIG} :$!"; my (@_boards); foreach () { chomp(); if ($_ =~ /Description/) { push @_boards, (split(/:\s*/, $_))[1]; foreach (@

RE:Write to a file

2001-10-30 Thread Jorge Goncalvez
Hi, I would write to a file c:\cygwin\etc\dhcpd\dhcpd.conf which contains this: vendor-class "PXEClient" { filename "/bootp/linux/pxe/pxeloader" ; default-lease-time 1800; max-lease-time 1800; option host-name "CLIN_1" ; ... I want to put

Re:create an empty file

2001-10-30 Thread Jorge Goncalvez
Hi, How do u create an empty file named c:\cygwin_syslog.txt in Perl? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE:error return function

2001-10-30 Thread Jorge Goncalvez
Hi, I have this code: if (/:\s*\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:/) { my $host = gethostbyaddr (&inet_aton ($_Globals{IP_ADDR}), AF_INET) or die "je ne peux résoudre $_Globals($_Globals{IP_ADDR}) :$!\n"; ($_Globals{CLIENT_NAME})=$host=~ /^(\w+)/; } it works

Re:How to assign an array variable to an Entry Box

2001-10-23 Thread Jorge Goncalvez
Hi, I have this: $_varRef=@_; $frm->Entry(-relief => "sunken", -textvariable => \$_varRef, -width => $_Globals{LABEL_LENGTH}, #-anchor => "w", -bg => "white") ->pack(-anchor => "w");

Re:Write to a file

2001-10-23 Thread Jorge Goncalvez
Hi, How I can write to the beginning of a file this: option vendor-encapsulated-options "install:KLOR_1:%$_varRef:$_varRef:$_varRef"; that can be for exemple: option vendor-encapsulated-options "install:KLOR_1:%pre2.2:standard:E1302.fr"; In fact I wanted $_varRef to be an array which coul

Re:Fill in a file

2001-10-22 Thread Jorge Goncalvez
Hi, I have this code: @_FieldEntries =qw {VER TI TV}; sub MakeEntries() { my $myframe = $_Globals{TOP_WINDOW}->Frame(-label => "", -relief => "groove", -borderwidth => 2) ->pack(-anchor => "w",pady => 20); foreach (@_Fiel

Re:Parsing a file with regex

2001-10-22 Thread Jorge Goncalvez
Hi, How can I do to parse a file(c:\cygwin\etc\DHCPD\dhcpd.conf) which is for exemple a part which contains: host col36545c { hardware ethernet 00:02:A5:31:7D:7C; option vendor-encapsulated-options "install:KLOR_1:%77.90"; filename "/bootp/linux

Re:Dns and gethostbyaddr in Perl

2001-10-18 Thread Jorge Goncalvez
Hi, I parse a log file in Perl Tk and I have for exemple this line: LOG_INFO : cabs41.col.bsf.alcatel.fr: read request for /bootp/cygwin.bat: success I have 2 labels to display the informations: in one I put cabs41.col.bsf.alcatel.fr in another I put only cabs41 My code is open FILE, "< $_

Re:Env command in Perl

2001-10-04 Thread Jorge Goncalvez
HI I wanted to do this: my _$cmd=env SHELL = /bin/bash d:\dhcp\server\dhcpd.exe eth0; system(_$cmd) ; but it doesn't work why? Thabks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re:configure Issue

2001-09-27 Thread Jorge Goncalvez
Hi, I have the following problem I wanted to change the number of blocks of a progress bar when it reaches 50. My code is: if ($_Globals{PROGRESS_VALUE} >= 50) { $pb->configure(-blocks=>100); $pb->update(); $_Globals{PROGRESS_VALUE} +=1;

Re:dynamic Progress bar

2001-09-26 Thread Jorge Goncalvez
Hi I would like to make a dynamic Progress bar which could grow up with the number of string ftpd received in a log file.Each square means that a ftpd arrived on the log file. How can I do this? My code is: open INFILE, "< $_Globals{SYSLOG}" or die "Cannot open $_Globals{SYSLOG} for reading:

Re:Win32::EventLog and Open issue

2001-09-26 Thread Jorge Goncalvez
HI, folks I am under NT and my problem is that my file cygwin_syslog.txt is always growing with the same informations that is boring.If I append with open(LOGFILE >...) the file is always destroyed and I have only one information and I want the whole logs informations I want to use open(LOGFILE

Re:Delete a line in a file

2001-09-24 Thread Jorge Goncalvez
Hi, I would delete a file if it is already present. for exemple I have: 1001337334: dhcpd : DHCPDISCOVER from 00:b0:d0:23:80:67 via eth0 1001337334: dhcpd : Reclaiming abandoned IP address 192.40.54.41. 1001337334: dhcpd : (DHCPDISCOVER) (ack_lease) CLASS_IDENTIFIER = PXEClient 1001337334: dhcp

Re:Regular Expression needed?

2001-09-20 Thread Jorge Goncalvez
Hi, folks I have 5 labels in a perl tk program. I have this line in my file: 1000975996: 44CGMB0114.col.bsf.alcatel.fr: read request for /bootp/cygwin.bat: success . my code is : open FILE, "< $SYSLOG" or die $!; while () { if (/([0-9a-z:]+)\s*via eth0/) {

Re:Set up issue

2001-09-17 Thread Jorge Goncalvez
- Begin Forwarded Message - Hi, I made a perl tk software which runs under Windows.Its name is frame14.pl. Now I wanted to create a set up program which could create in the Windows desktop a group of progra which contains one icon called "Boot server". By double click

Re: Regular expression needed

2001-09-14 Thread Jorge Goncalvez
- Begin Forwarded Message - Date: Fri, 14 Sep 2001 11:46:54 +0200 (MEST) From: Jorge Goncalvez Subject: Re: Regular expression needed To:[EMAIL PROTECTED] Mime-Version: 1.0 Content-MD5: BW3TUqtgmcGzRIcQHrT+CQ== Hi, I have this line: dhcpd : LOG_INFO : DHCPDISCOVER

Re:File & Array

2001-09-13 Thread Jorge Goncalvez
Hi, How in Perl you can store each line of a file in an array? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re:seek a string

2001-09-13 Thread Jorge Goncalvez
Hi, I would like to open a file and know if a string exists. How can I do this? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Parse a file

2001-09-13 Thread Jorge Goncalvez
- Begin Forwarded Message - Date: Thu, 13 Sep 2001 10:45:03 +0200 (MEST) From: Jorge Goncalvez Subject: Re: Parse a file Mime-Version: 1.0 Content-MD5: DZmPkpqQxHxJV6ZMZxyK0Q== Hi folks, I wanted to parse a file which is always growing. If this file contains first the

Re:File Parser

2001-09-12 Thread Jorge Goncalvez
Hi, I would like to open a file , and know if it contains the word DHCPDISCOVER on it , How can I do this in Perl? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Function & Parameters Problem

2001-09-12 Thread Jorge Goncalvez
- Begin Forwarded Message - Date: Wed, 12 Sep 2001 16:51:13 +0200 (MEST) From: Jorge Goncalvez Subject: Re: Function & Parameters Problem Mime-Version: 1.0 Content-MD5: /AKUA+PVUkkQyC62C5CZ8A== Hi, I have this code: &makelabels($language_EA,$ethernet

Re:Seek issue

2001-09-11 Thread Jorge Goncalvez
Hi, I have this code: open FILE, "< $SYSLOG" or die $!; seek FILE,10,2; read FILE,$buf,10; if($buf =~ /success$/) And there is always nothing in $buf althought the file ends with

Re: Problem with open

2001-09-10 Thread Jorge Goncalvez
- Begin Forwarded Message - Date: Mon, 10 Sep 2001 18:11:06 +0200 (MEST) From: Jorge Goncalvez Subject: Re: Problem with open To: [EMAIL PROTECTED] Mime-Version: 1.0 Content-MD5: hoCpfVU18Iz7US62lINUDg== Hi, I made a program which runs good the first time but wrong

Re:If always verified

2001-09-10 Thread Jorge Goncalvez
Hi, I have this code: tie *FILE,'File::ReadBackwards', 'c:\\cygwin_syslog.txt' or die "Can't read logfile.txt: $!"; $lastline = ; if(defined $lastline and $lastline =~ /$success/) { ..

Re:tie handle problem

2001-09-10 Thread Jorge Goncalvez
Hi, I have this code : tie *FILE,'File::ReadBackwards', 'c:\\cygwin_syslog.txt' or die "Can't read logfile.txt: $!"; $lastline = ; if(defined $lastline and $lastline =~ /^LOG_iNFO/) { #d

  1   2   >