Hello if you want to share variables content you might to use 'our'
instead of 'my'.
But I don't understand your example with 'use "file1.pl"'.
I always use 'use module_name' and never 'use program_name'
Can you tell us more
[EMAIL PROTECTED] a écrit :
Hello,
Could someone tell me if this i
What is the origin of $line ?
if you wrote $line = you should remove the "\n" and or "\r\n" at
the end of $line.
And if the user enter not numeric value you should always shuch an error.
You should check if the value is numeric or use 'eq' instead of '!=' .
If you removed the "\n" ou "\r\n"
If you are sure that the element is always writtent
on a separate line.
you should try
open (FILE, my_file);
while ()
if // {
print "$1\n" ;
}
close (FILE) ;
It is not XML like but it works very faster.
Beginner a e'crit :
Hi,
I have a huge XML file, 1.7GB, 53080215 lines. I am t
Patrick Marion has written:
I think that your 'close (OUTPUT)' is inside the sub 'pits'
you might put it before 'sub pits {' to get it at the logiccal end of
your program.
John Jack has written :
Hi Group
I'm new to perl and haven't used it before. I'm still practising and trying
my best to
patmarion has written
perhaps you have sme quotas or restriction about CPU usage for a script.
Can you have a look in your /var/log/messages just after the perl script
stop
sivasakthi a écrit :
Hi all,
I have running the perl script. In that script i have opened the very
large file (2.5GB
Try this :
my $number = 0 ;
open (MYFILE, '123.txt');
while () {
if ($_ =~ /^User:/) {
++$number ;
print $_;
}
}
close (MYFILE);
print "Number:$number\n" ;
Marco a écrit :
Hi..
I have a question about how to count the total of line that shows on
the screen. Here below is my code
Patrick MARION a écrit :
Can you tell more about your script.
The first thing about difference between command line dand cron is about
environment or perhaps STDIN.
Perhaps you can make a trace with several "print tracexxx" at several
critical places in your script.
Without redirection to
Can you try
if ( $projet =~ /^([EMAIL PROTECTED])@/ ) {
$provb = $1
}
You will collect all characters from the beginnning to the first '@'.
If The first character is a '@' you will obtain an empty string.
If the first character is a '@' and you want to exclude this case use
'^([EMAIL PROTECTED
Can you try
if ( $projet =~ /^([EMAIL PROTECTED])@/ ) {
$provb = $1
}
You will collect all characters from the beginnning to the first '@'.
If The first character is a '@' you will obtain an empty string.
If the first character is a '@' and you want to exclude this case use
'^([EMAIL PROTECTED
can you add after your 'insert'
$text1->update() to make a refresh.
You need an update if there is no new event in your widget.
Be areful : Don't use update for each line if you insert a lot of lines
but only at the end of a batch or only every 100 lines to keep good
performance.
macus
If you use one array for lib et one for data you will get one bar by lib
If you use one array for lib and two arrays for data tou will get two
bars for each lib.
If you use one array for lib and three arrays for data tou will get
three bars for each lib.
And so long
lists user a écrit :
PatMar :
Can you add $text1->update() after your $text1->insert.
widget->update is like a refresh on other X11 windows manager.
CM Analyst a écrit :
Hi All,
I hope this is still the correct forum to get help
with Perl/Tk...
My goal is display the time in the GUI window but it
doesn't do it
Hello,
I use fedora 7 and yesterday I updated perl with perl-5.8.8-23.fc7
After this update I want to install new modules with CPAN and I got this
message :
Catching error: 'Undefined subroutine &Compress::Zlib::gzopen called at
/usr/lib/perl5/5.8.8/CPAN/Tarzip.pm line 103.
' at /usr/lib/perl5
patmarbidon a écrit :
Luba Pardo a écrit :
Dear list:
I wrote a script that takes a list of ids from an input file and
store these in an array in a pairwise-like manner (if total list is n
then the array is (2 ^n)-n). I need to extract for each pair of ids a
certain value from a huge file
Luba Pardo a écrit :
Dear list:
I wrote a script that takes a list of ids from an input file and store
these in an array in a pairwise-like manner (if total list is n then
the array is (2 ^n)-n). I need to extract for each pair of ids a
certain value from a huge file that contains the pair of
15 matches
Mail list logo