9-0/lib/POD2/DE/local
.cpan/build/local-lib-2.29-0/lib/local
But they are in the “build” directory. This is a little bit suspicious. Am I
missing some installation steps? Would you please help me to install
“local::lib” correctly? Thank you very much and have a wonderful day ahead!
—
Best wishe
patient or is the advice in
the book no longer relevant? Please let me know. Thank you and have a good day
ahead!
--
Best wishes,
Maxim
Maxim Abalenkov \\ maxim.abalen...@gmail.com
+44 7 486 486 505 \\ www.maxim.abalenkov.uk
ound");
> print @test;
>
> i am getting output as follows
>
> /test/playground
>
> i need the output in following fasion
>
> /test
> /playground
>
> can you please tell me what is wrong?
>
> Regards
> Irfan.
--
Maxim
--
To unsub
)
> {
> /^DR\d+.*?(\d+).*?(\d+)(.+)/
> and print "$1;", 0+$2, ";$3\n" ;
> }
>
> If your data is in pqd.in, and pqd.pl is execuable, then just run it as
>
> pqd.pl pqd.in
>
> --
> Affijn, Ruud
>
> "Gewoon is een tijg
code!!! ) sub
>> that needs to be cleaned up. I am not to sure on how todo
>> this... I have
>> ideas etc.. but would like info as to a cleaner more professional way.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
mputer - DNS
server.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
not know why this doesn't work: Prompt =>
DJH> '/\[$::username\@$::machine\]\$$/'.
because you do not understand difference between
'/\[$::username\@$::machine\]\$$/' and "/\[$::username\@$::machine\]\$$/"
try
print '/\[$::username\@$::machine\]\$$/&
at modules at
http://search.cpan.org/search?mode=module&query=ping
Things, which shows you, that system is NOT connected:
1. you can not reach your default gateway
2. you can not operate with your provider's DNS server(s)
addresses of gateway and DNS servers you can obtain by run
ut this is proving problematic.
DP> Are there any lightweight alternatives? Has anyone got a better way
DP> to do this than uucp or had trouble getting this to work?
hmmm... what about [t]ftp?
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mai
Hello Gary,
Friday, January 04, 2002, Gary Hawkins <[EMAIL PROTECTED]> wrote:
GH> How can I check whether the system is connected?
GH> Want to pause the script if connection is lost.
your OS? and your connection type?
Best wishes,
Maximmailto:[EMA
ences.
just for your information: you can avoid these two things - http://cygwin.com/
with cygwin you can run, for examples, Xfree server on windows
computer.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
oc -f open
for "+", ">", ">>" modifiers.
and, may be you should check 'seek' function.
perldoc -f seek
"You can't usually use either read-write mode for
updating textfiles, since they have variable length records. See the
-i swit
LSBIN
DOC INFO LIBEXEC MAN SHARE
RSC> Is this
RSC> something I can change under Apache (I'm running 1.3)?
hmmm... no.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ct($data_source, $username, $password);
FJC> 104 my $sth2 = $dbh2 -> prepare("insert into
history(num,title,date,user1)values('$num','$date1','$date1','$name')");
FJC> 105
FJC> 106
FJC> 107 $sth2 -> execute
functions by running
'perldoc perlfunc'.
If you really need interface to lpt port, write your own module (in C, you
call it library), in C and use them. see
'perldoc perlxs'
for more details.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubs
hanks in advance.
unfortunatelly, you've got bad examples...
take a look at
perldoc perlipc
, which contains working client/server samples.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ay, 20 seconds - because the server needs to be restarted.
take a look at sample in
perldoc -f alarm
to load page from http server, you can use lynx, of course, but i
suggest you to use perl module 'LWP'.
perldoc LWP::Simple
perldoc LWP
Best wishes,
Maximmail
homp;
CI> if $_ =~ ? # this is where I'm getting lost, want to
CI> compare $_ from above () to $_ from ()
$b=$_;
if $b =~ $a
CI> then I'm just printing my diffs so I can correc the necessary files.
Best wishes,
Maximmailto:[EMAIL
t existingemail is an
AS> optional field. If there is no email address given, I would like to
AS> print out "NO EMAIL PROVIDED". How do I do this within my while loop.
AS> When this report is run, it is piped to a csv file so that it can easily
AS> be imported into Excel. Th
Hello Michael,
Wednesday, December 05, 2001, Michael McQuarrie <[EMAIL PROTECTED]> wrote:
MM> Maxim,
MM> Correction:
MM> The "use strict;" requires the arguments to all be quoted.
yes.
MM> In the real script I am only using "use strict 'vars';"
lse {
PC>
PC> break;
PC> }
PC> }
PC> the break statement is not working. Even when it comes into the else part,
PC> it doesn't break the for loop.
PC> Suggestions?
perldoc -f last
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
ed as a quote operator.
MM> I am using a \w to try and match all invalid options but \w will
MM> not match the q. Anyone know a way around this? I would like to
MM> keep the same syntax for calling the sub.
i suggest you to put
use strict;
line at the top of your source and run
perl -c yoursource
to check syntax.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
w is [a-zA-Z0-9_]
if you want to separate letters and digits, you need something like
this:
($code,$num) = ( $p =~ /^([a-zA-Z]+)(\d+)/ );
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
com/pub/a/language/info/software.html
http://www.activestate.com/
SS> Also, any pointers for basic tutorials?
http://perl.oreilly.com/
http://learn.perl.org/
http://www.perl.org/
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROT
Hello Andrew,
Wednesday, December 05, 2001, Andrew Clark <[EMAIL PROTECTED]> wrote:
AC> The subject says it all.
AC> R,
AC> AJFC
AC> Please CC replys, I'm not on the list.
perldoc -f require
perldoc -f use
Best wishes,
Maximmailto:[EMA
> elsif ($status == 1) {
DF> #Do this other sub...
DF> sub2();
DF> } else {
DF> #Continue while loop...
DF> }
DF> }
DF> Can I make it smaller. I want to know this to improve my Perl skills.
perldoc -q switch
Best wishes,
Maxim
Hello Tirthankar,
Tuesday, December 04, 2001, Tirthankar C. Patnaik <[EMAIL PROTECTED]> wrote:
TCP> Hi Maxim,
>> no :) you forgot to escape backslash. but there is no difference
>> between \ and / slashes in path names in perl for windows.
>>
TCP> Thanks for t
a = ($uid + 1);
CR> bit shitty if your pass files get's to long.
so what?
open (TFH," ) {
($user,$pass,$uid,$gid,$info,$home,$type) = split /:/, $line;
}
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTE
t;
RG> To: <[EMAIL PROTECTED]>; John W. Krahn <[EMAIL PROTECTED]>
RG> Sent: Tuesday, December 04, 2001 6:57 PM
RG> Subject: Re: problem executing linux command in perl
RG> chmod 0777, $r_file or die "Cannot chmod $r_file: $!";
RG> giving error :
RG> error :Can
an write
my @uids=`tail -n5 /etc/passwd | cut -d: -f3`;
what do you need, exactly? trying to parse /etc/passwd?
take a look at sample in
perldoc -f split
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
mode=module&query=sftp
AM> By the way, Are these modules installed by default on the Perl
AM> distributions?
by default - no.
AM> Or, how can I tell if a module is installed or not?
something like
perl -e "use Net::FTP;"
if module is not installed, you'll recie
Hello Jorge,
Tuesday, December 04, 2001, Jorge Goncalvez <[EMAIL PROTECTED]> wrote:
JG> HI, I wonder if there is a way to create an NT user with Perl?
take a look at net.exe program.
try
net help
net help user
Best wishes,
Maximmailto:[EMAIL PROTECTED]
in perl for windows.
second, unlink <$_path/*> does not works.
can be
my $_path = "c:/EventLogs";
if( -d $_path )
{
chdir $_path;
unlink <*> or die $!;
}
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
t;
>>
>> Yep -- there's a module on CPAN called Expect.pm. It works as you would
>> expect. :-)
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
, please contact me, not [EMAIL PROTECTED]
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
gt; Can anyone provide an example of how to do this or point me in the
CS> right direction.
something like this?
print '';
while ( @record = $sth->fetchrow_array() )
{
print '';
foreach my $r (@record)
{
print "$r";
}
print '';
}
print
a directory
>> files that are at least 3 days old.
>> Good luck all,
>> You're welcome to pick who you think is the winner.
you already has solution. do you want it especially in perl?
ok ;)
@result= `find . -newerct \'3 days ago\' -maxdepth 1 -exec rm \{\} \\;`;
will run at the same time as the original process and everyone will be
R> able to do their thing?? is this correct? Sorry for the newbie question.
you can read
perldoc -f fork
man fork
but, i'm afraid, fork is very difficult for beginner.
there is no basic syntax, just $pid=fork().
Best wishes,
your.cpan.site/CPAN/] ],
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
apache, you can read
http://httpd.apache.org/docs-2.0/suexec.html
too.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
mpressed Size/;
DP> }
DP> print OUTPUT "$file $bar \n";
move your print inside if (/Raw/) { } to avoid useless repetitions.
while () {
chomp;
if (/File Name: /) {
$name = $';
}
if (/Raw/) {
$size = $';
$si
tabase. use
my $database= 'mydatabase:localhost';
and see
perldoc DBD::mysql
for more information:
$driver = "mysql";
$dsn = "DBI:$driver:database=$database;host=$hostname;port=$port";
$dbh = DBI->connect($dsn, $user, $password);
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
looks like i'm only one from Russia (Moscow) here...
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
t.
well, try to
select(TO_SERVER); $| = 1; select(STDOUT);
then.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
("four" => 4, "five" => 5, "six" => 6);
WD> my %h3 = ();
WD> mergehash( \%h1, \%h2, \%h3);
WD> sub mergehash {
WD> my ( $h1, $h2, $h3) = @_;
WD> foreach my $MyKey1 ( keys %{$h1} ) {
WD> $h3->{$MyKey1} = $h1-&g
location for
AJHRe> "C"?
AJHRe> #!/usr/bin/perl -w
AJHRe> @letters=("A", "B", "C");
something like this?
#!/usr/bin/perl -w
@letters=("A", "B", "C");
sub replace
{
my ($ref)=(@_);
$ref->[2]="D";
}
repla
ition, because $i
changed after input.
JC> but still not having much luck. Any ideas?
something like
$i=-1;
do{
$i++;
chomp($value[$i] = );
} until (!$value[$i]);
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e and the hostname.foo.com notation and it does not
WN> work.
WN> It does work when I replace $nodename with 'node.foo.com' but I
WN> can't get the imputed variable to work?
perldoc -f chomp
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
this not set up for that?
$nodename='node.foo.com';
$ent=gethostbyname($nodename);
where is your problem?
example:
use Socket;
use Net::hostent;
$h = gethostbyname("www.perl.com");
print "name:", $h->name," address:",inet_ntoa($h->ad
erver|system logs and configuration.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
lt?
WG> How can I redirect it to a specific file?
see
perldoc -q "How can I capture STDERR from an external command"
basically,
system("program args 1>/tmp/program.stdout 2>/tmp/program.stderr");
Best wishes,
Maximmailto:[EMAIL PROTECTED
Hello Maxim,
Saturday, October 27, 2001, Maxim Goncharov <[EMAIL PROTECTED]> wrote:
MG> I need help with understanding what is happening when I fork a
MG> process.Here is actual code:
you did not 'fork' process. 'fork' is very special function, see
perldoc -f fo
HI everyone,
I need help with understanding what is happening when I fork a
process.Here is actual code:
#!/usr/bin/perl -w
use strict;
use Fcntl qw(:DEFAULT :flock);
use POSIX;
#use Mail::Mailer;
my ($pid);
$pid = open(HHH,"| infloop");
if($pid){
print HHH "bla bla \n";
}
where infloop i
Ar!!
Be easy, friend :) Be simple:
while (<>)
{
last if (m/^\s*model\s*tiny.*/i);
}
, and terminator never stands after you :)
p> If can everybody can tell me whats wrong here i can sleep safly... Thanls!!!
Best wishes,
Maximma
by your prompt value on your HOST
next, you forgot
$telnet->open(HOST);
JE>$telnet->login(USER,PASS);
JE> my @lines = $telnet->cmd($command);
JE> print @lines;
JE>$telnet->close;
JE> ##
JE> "
and see
perldoc Net::Telnet
for more examples.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
001] a.pl: Global symbol "$sth" requires explicit package
name at a.pl line 21.
[Sat Oct 27 01:14:05 2001] a.pl: Global symbol "$current_date" requires explicit
package name at a.pl line 32.
read
perldoc perlmod
for more information.
by the way, don ot use '&' to call function; it' not neccessary.
take a look at
perldoc perlsub
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi all,
I ran into the problem with forking and I am not able to figure out what
happens. Here is the code (let's call the program server):
$pid = open(HHH,"|- ");
if($pid){
print HHH "something\n";
}else{
exec "client"
}
Notice that I do not call close(HHH) because I want the parent just t
Hi all,
I ran into the problem with forking and I am not able to figure out what
happens. Here is the code (let's call the program server):
$pid = open(HHH,"|- ");
if($pid){
print HHH "something\n";
}else{
exec "client"
}
Notice that I do not call close(HHH) because I want the parent just to
Hi all,
I ran into the problem with forking and I am not able to figure out what
happens. Here is the code (let's call the program server):
$pid = open(HHH,"|- ");
if($pid){
print HHH "something\n";
}else{
exec "client"
}
Notice that I do not call close(HHH) because I want the parent just t
un this against config.cfg, it gives me the string OAM... Can I
JL> make that a variable?
yes :)
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ero/inputConversions/Bin2Ascii/bin2ascRunScript.bat';
TC>$status = system("source $file);
syntax error here - no closing "
TC># Ive also tried $status = system("source", $file);
well... but where is your FORTRAN program?
/trinidad/uamaero/inputConversions/Bin2
o fix
CP> it, use an inplace edit:
CP> perl -pi -e 's/\r//g' somescript.pl
CP> Just be sure to back up the file first!
-i does backup for you ?
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addi
nux. this is a long song, but i
can sing, if anyone is interested :)
RW> Thanks but no cigar yet ;-)
no smoking:) want to die at full health :) (sort of humor)
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e between windows and linux, switch your
ftp client to 'ascii' mode.
If not, tell your editor to save output file in unix format.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
side loop, for example.
MP> perl to see if variables resides inside quotes, but don't know if this is
MP> significant to bother with single quotes.
personally, i prefer '' in next case:
my $a = "\$\@\^";
my $a = '$@^';
MP> ps. I've always used
lt;2> n
main::(t.pl:6): print "loops took:",timestr($t),"\n";
DB<2> n
loops took: 0 wallclock secs ( 0.22 usr + 0.00 sys = 0.22 CPU)
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
; allow perl to complete the action, or am I out of luck, stuck kluging the
MS> script in ksh.
if you have apache web server, take a look at suexec.
http://www.apache.org/docs-2.0/suexec.html
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [
3:field5
JL> am I crazy for saying I could do this?
no.
JL> Until today I considered myself a novice Perl programmer, but now
JL> I'm not so sure. Any help would be greatly appreciated!
please show us your code?
Best wishes,
Maximmailto:[EMAIL PRO
doc -f seek)
and tell (perldoc -f tell).
here is sample(taken from fido7.ru.perl, author Dmitriy Goldobin ):
sub PrintReverse
{
open FILE, shift; binmode FILE; seek FILE, 0, 2;
my $chunk = "";
for( my $pos = tell(FILE) & ~2047; $pos >= 0; $pos -= 2048 ) {
er execution path, Am I doing something
YG> wrong ?
no.
your 'print <<"TARGET"' prints TARGET _after_ constructing all TARGET
content. try
sub interp {
my ($arg) = @_ ;
return "Hello World, $arg \n" ;
}
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ot need that &, so don't use it, it's dangerous.
example:
sub a
{
print "sub\n";
}
print "test"
&a;
i've missed ';' after 'print "test"', and now i got
print "test" & a;
construction. very difficult to find.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
;t know.
yes, it's possible via perl debugger and $ENV{PERLDB_OPT}.
perldoc perldebug
search for "UsageOnly"
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
next;
KJ> }
KJ> if(((-M $file) > 60) && ((-s $file) > 1024 ** 2 * 50 )) {
KJ> print LOG "$workdir/$file\n";
KJ>
iable!$regex!;
>>
CS> Well, in this case, I don't see a problem. The contents of $variable (and
sorry, my mistake. in that case regex works correctly.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ou are using s!!!g, then surely you will know what
CS> will be, even if you don't know the contents of that variable.
no.
CS> or am I misunderstanding you?
may be.
example:
$regex=; chomp $regex;
$variable=; chomp $variable;
$a =~ s!$variable!$regex!;
any ideas?
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e (I believe) any non-alphanumeric character as a regex
CS> delimiter. I like !, /, ^, and {} personally.
:) what if i don't know variable name?
$! is $OS_ERROR, $ERRNO
$/ is $INPUT_RECORD_SEPARATOR, $RS
$^ is $FORMAT_TOP_NAME
well, ${ unassigned now...
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
rnate
CS> delimiters.
ok, what about "$!" ? use @? what about "$@"?
and so on...
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
re. am i
ROC> right in assuming regex needed for this?
in perl way, yes. something like
$a="a\nb\nc\nd\n\n\n";
$b=$/;
$a =~ s/$b//g;
alternativelly, you can take a look at
perldoc -f substr
Best wishes,
Maximmailto:[EMAIL PROTECTED]
p.s. does anyone know
Hello Rory,
Saturday, August 25, 2001, Rory O'Connor <[EMAIL PROTECTED]> wrote:
ROC> Another quick one - how can I easily strip line break characters from a
ROC> variable?
see
perldoc -f chomp
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
ou mean? NTP? or you need local time from your
computer? see
perldoc -f localtime
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
n. I've written it
M> in many ways, but it still sorting by second column.
M> Could you help me solve this problem?
for (sort {$a <=> $b} keys %map) {
printf("%d;%d\n", $_, $map{$_});
}
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
nd show us output.
BK> $rec{$db_cols[$i]} = $data[$i];
BK> }
BK> last LINE;
BK> }
BK> }
BK> close DB;
BK> $found ?
BK> (return %rec) :
BK>
sure, that have correctly understand you.
may be you need this?
$generatedCode = '$test = "some result"; print "test is: $test";';
$generatedCode =~ s/print /return /;
my $testvar = eval "$generatedCode";
print "testvar=$testvar";
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ke this:
sub ip2ul {
return unpack( 'N', pack( 'C4', split( /\./, shift ) ) );
}
sub ul2ip {
return join( '.', unpack( 'C4', pack( 'N', shift ) ) );
}
(receipts stolen from russian fido7.ru.perl group)
Best wishes,
Maxim
nd_mail
CSM> print "Content-type: text/html\n\n";
CSM> print <<"EOF";
CSM>
CSM>
CSM> Sent email:
CSM> $from
CSM> $email
CSM> $subject
CSM> $messagebody
CSM>
CSM>
CSM> EOF
CSM> ----
CSM> Sorry remedial ques
Hello Robert,
Tuesday, August 21, 2001, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Ric> What is the best perl example of a k-shell case statement as follows:
Ric> case "$VAR1"
Ric> in
take a look at "Basic BLOCKs and Switch Statements" in
p
eciated
what is your environment?
you can get above result if, for example, you have created myfile.txt in
windows ($/=\r\n), tranfers myfile.txt to unix-like OS ($/=\n) in binary mode,
and then run your script in unix.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
tscape...any solution
RG>
RG>
just add empty line after
Content-type : text/html
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
JD>b) Any guideline on how to improve my code
perldoc Net::SMTP
use Net::SMTP;
$smtp = Net::SMTP->new('mailhost');
$smtp->mail($ENV{USER});
$smtp->to('postmaster');
$smtp->data();
$smtp->datase
/$dir_name");
pn> }
pn> ### end of main
pn> ##
pn> Sub myMkDir
pn> ##
pn> sub myMkDir {
pn> my $dir = shift;
pn> if (-e $dir) {
pn> if (!(-d $dir)) {
pn> # Exist, but not a directory, it
while( $a= )
{
$b=;
if ($a ne $b)
{
$retval=0; last;
}
}
close IN1; close IN2;
return $retval;
at the beginning, you can compare files size (perldoc -f stat).
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
//www.mysql.com/downloads/os-win32.html. he is
very old, but still works. But, here you will have problems with new
modules which you will install - you will need win32 C compiler.
decision is yours.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe,
ans
CFFDT> temp.htm $!\n";
CFFDT> }
CFFDT> if (/DATA\/unnoir.gif/) {last};
CFFDT> }
CFFDT> close(FICHIER);
CFFDT> close(TEMP);
CFFDT> }
CFFDT> closedir LMI;
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
$boolean = 1;
JP> else
JP> $boolean = 0;
JP> }
JP> is there a more elegant way to do it?
$boolean = grep /AF1/,@mylist;
perldoc -f grep
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello Jennifer,
Thursday, July 26, 2001, Maxim Berlin <[EMAIL PROTECTED]> wrote:
MB> $boolean = grep /AF1/,@mylist;
sorry, incorrect sample. should be:
$boolean = grep /^AF1$/,@mylist;
with first regexp you catch every string, that contain 'AF1'.
thanks to Moone
mode'.
perldoc -f binmode
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
$$ref2[0];
}
see perldoc perlref for more.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
me in the right direction.
if you need to send email(s), take a look at Net::SMTP module.
perldoc Net::SMTP
if you have it already installed, or
http://search.cpan.org/doc/GBARR/libnet-1.0703/Net/SMTP.pm
otherwise.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsu
...
G> @_ = ($hour, $minute, $second, $frame, $crap1, $crap2, $crap3, $crap4) =
G> split(/:/,$line);
(if i correctly understand you) try
split(/[: ]/,$line);
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
nce(\%wdf), so you should use pointer.
see
perldoc perlref
for more information.
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
1 - 100 of 134 matches
Mail list logo