460 Posted Topics
Re: make sure you are uploading the file in ASCII (text) format and not binary format. | |
Re: Maybe its an age difference thing, me being 50 years old and you being much younger. But why do you even care that you got a bad rep in the word game forum? If I were to ever paticipate in that forum and someone actually took the time to bad … | |
Re: have you tried: write MAIL; where MAIL is the currently opened filehandle that prints the email message. | |
Re: Start a new thread, it is not polite to ask a new question in a thread another person has started. | |
Re: I think you have posted in the wrong forum, this is the [B]perl[/B] forum. Post your question in the appropriate shell scripting forum if there is one. | |
Re: Is this school work? Do you this question posted on other perl forums? Whats the purpose of including the resID if it's not being used in the output? | |
Re: A very thoughtful solution. It does help the pages to load faster. Thank you very much, Kevin | |
Re: My honest opinion is: I don't care one way or the other. So I was unable to vote in your poll. | |
Re: I maybe can help if you can clarify what the problem is in more detail. This makes no sense to me: [QUOTE]Here is where the problem lies. The message "b" in brackets is not taken out of the entire mailmessage and the database field is empty.[/QUOTE] | |
Re: The easiest or the best or a compromise? The easiest: open the files one at a time and use whatever method works for finding what ever it is you are searching for. The best: store the data in a database. A compromise: index the site and search only the index … | |
Re: That version of perl should support the use of back references. | |
Re: [CODE]opendir(DIR,'backup_folder') or die "$!"; my @folders = readdir DIR; close(DIR); if(scalar @folders > 4) { remove_some(); } elsif (scalar @folders < 4) { add_some(); } else { print "4 folders, do nothing"; } sub remove_some { a sub routine to delete some folders } sub add_some { a sub routine … | |
I had a need to read one of the code snippets I posted a while back (perl) and noticed the syntax highlighter has screwed up the code I posted by adding an extra backslash making the snippet no good. I thought I would just try and edit the snippet but … | |
Re: Your code is hard to understand. You appear to be checking for the existence of a hash key: [CODE]if(exists $name {$a}){[/CODE] even though the syntax is a little messed up (a space between $name and {$a}) it probably still works. but then you are using aray syntax when you try … | |
Re: Just because big sites do something doesn't mean it's a good thing. They probably have people that need to justify their salaries so they make marginal changes and claim some valuable benefit, even though your common sense tells you this is just a cosmetic change that does not improve content, … | |
Re: I wish I would have found that Ad Blocker addon long ago. It works great, the site loads way faster (on dialup) and no more obnoxious animated billboard ads. It's the best of both worlds because daniweb still gets it's money for postng ads that I and anyone else that … | |
I assume if it is happening to me it must be happening to others. I am using FireFox 2 on dial up (56k). See attachment. | |
Re: I think the dots were just for representation, he probably just wants to right pad the fields with spaces. | |
Re: Is this school work? | |
Re: what a drama queen.... you need to step back from your computer anyway, IMHO. You take this chatting stuff way too serious. Don't let the door hit your behind on the way out. Keep your promise and make that your last post, thanks. | |
Re: is that "all forums" or "this category"? When I look at "all forums" there are mostly IT forums displayed but also feedback and lounge threads. | |
Re: what does "try to run it direct" mean? Do you have perl installed on your computer? You can't run perl scripts without perl. If you are trying to run a local perl script from your browser you will also need an http server installed, setup, and running. ![]() | |
Re: Look into using the Expect or Expect::Simple module. [url]http://search.cpan.org/search?query=expect&mode=all[/url] | |
Re: [QUOTE] If you could change one thing ...[/QUOTE] get rid of that floating pop-up when you mouse over topics. Obnoxious, now it follows you around like a cockroach, get rid of it. Plus the script seems to be causing a long delay in page loads. | |
Re: there is a reply on the the other forum you posted this same question on. | |
Re: You should use perl to crate the directory: mkdir("blah") or die "Can't mkdir blah: $!"; but if you are using system() examine the return value of system, see the system documentation for details: [url]http://perldoc.perl.org/functions/system.html[/url] | |
Re: What have you tried so far? Is this school/class work? | |
Re: I don't see any ads on DaniWeb anymore which is why I have started participating again. AdBlocker Plus addon for Mozilla works great. The pages load much quicker and are 100% ad free. Sorry sponsors/advertisers, but you guys should make smaller and less obnoxious ads and there would be no … | |
Re: this part of your code isn't correct, the syntax is bad. [CODE]&usage if ( scalar @ARGV != 3){ else { die "Too many arguments\n"; }[/CODE] try like this: [CODE]use strict; if (scalar @ARGV != 3) { die "Wrong number of arguments\n"; } my ($file1, $file2, $deviation) = @ARGV; [/CODE] | |
Re: use the MIME::Lite module and sending attachments is a piece of cake. [URL="http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm"]MIME::Lite[/URL] | |
Re: makes no sense to me. Did you get this warning fixed? Use of uninitialized value in substitution (s///) at (eval 44) line 44. [Thu Apr 19 11:31:55 2007] index.cgi: Use of uninitialized value in substitution (s///) at (eval 44) line 44." in index.cgi | |
Re: sorry I don't know, but I hope thats not your real name and password you posted. | |
Re: what you really want are string anchors (^$): $result = $start_date =~ /^\d\d\/\d\d\/\d\d$/; the way you are doing it is checking a sub string, so dd/dd/dd anywhere in the string would match (where "d" is a single digit) | |
Re: whats the format of the start date? | |
Re: I'm not sure if this is a wise way to do this, but it should work: [CODE]$ENV{PATH}='/bin/perl:/bin/bash'; open (PS, 'ps |') or die "$!"; print <PS>; close PS;[/CODE] | |
Re: [CODE]#!/usr/bin/perl $s1 = "testing $my string"; $s2 = "testing \$your string"; local ($^I, @ARGV) = ('.bak', 'file.data'); while (<>) { s/\Q$s1\E/$s2/g; print; }[/CODE] | |
Re: [CODE][COLOR="Black"]open (PERF, "Perf.txt") [COLOR="DarkOrange"]or die "can't open perf.txt: $!"[/COLOR]; open (DSA, "Neu.txt") [COLOR="DarkOrange"]or die "Can't open neu.txt: $!"[/COLOR]; chomp(@Perf = <PERF>); chomp(@Neu = <DSA>); my %seen; # lookup table # build lookup table @seen{[B][COLOR="DarkOrange"]@Neu[/COLOR][/B]} = (); foreach $item ([B][COLOR="DarkOrange"]@Perf[/COLOR][/B]) { # print ($item) unless exists $seen{$item}; push (@miss, $item) unless … | |
Re: what does the data look like? what does the number you are looking for look like? why are you going through the array backwards? what is $match being used for? | |
Re: [CODE]($parsed) = $var =~ /\{108:([^}]*)\}/;[/CODE] | |
Re: best to ask in a shell scripting or unix/linux forum. | |
Re: See if anything helps you: [url]http://perldoc.perl.org/perlipc.html[/url] | |
Re: [CODE]#!/usr/bin/perl use strict; use warnings; open(IN, '<',"dna.dat") or die "Can't read file\n $!"; my $first_line = <IN>; my $dna = ''; while(my $line=<IN>){ chomp $line; $dna .= $line; } close IN; my $cdna = ''; for my $i (0 .. length($dna)-1){ $_ = substr($dna, $i, 1); if (!/[TAGC]/) {die "Unkown … | |
Re: tr/// only replaces characters for characters (transliteration). It is very limited but faster than s/// for simple character replacing. s/// is a full blown regexp that can use all of perls various options for pattern matching and substitution. For example if all you wanted to do was replace all A's … | |
Re: I don't think that has anything to do with the daniweb website. | |
Re: It may seem strange to you, but thats because you don't understand what is happening. Whenever you send anything in the system array to a sub routine or function the list becomes "flattened". This means that where one list ends and another begins is lost, and it becomes one long … | |
Re: maybe you need to use an array instead of a scalar for capturing the reults: my[B] @result [/B]= $t->cmd(("grep - $filename.txt~ | wc -l | awk '{print $1}'")); | |
The amount, size, placement, and etc, of advertisements on the pages is getting a bit obnoxious (one ad that scrolled across the screen was very obnoxious). I understand the need and the desire for advertising, but the pages are starting to look like billboards with some content thrown in instead … | |
Re: jemather, the code you posted shouldn't even produce values for the scalars in the $sql scalar. [code]('".$title1."', '".$format1."', ".$r_date1.")"[/code] there are no $title1 or $format1 or $date1 scalars defined in the code you posted. You have $title and $format and $r_date. with the correct scalars, the line is better written … | |
Re: [QUOTE]Likewise[/QUOTE] this thread is from 2005, hopefully Shon05 has his program done by now. ;) | |
![]() | Re: why can't you use the system() function or qx// or backtiks? You can look into the Term::Readkey module which I have never used but maybe it can do what you want. You would most likely have to install it though. [url]http://search.cpan.org/~jstowe/TermReadKey-2.30/ReadKey.pm[/url] |
The End.