Search Results

Search found 1530 results on 62 pages for 'killer pl'.

Page 14/62 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • how to count all distinct records in many-to-many relations in django ORM?

    - by marduk-pl
    hi, i have two models: class Project(models.Model): categories = models.ManyToManyField(Category) class Category(models.Model): name = models.CharField() now, i make some queryset: query = Project.objects.filter(id__in=[1,2,3,4]) and i like to get list of all distinct categories in this queryset with count of projects with refering to these categories - exactly i would like to get that results: category1 - 10 projects category2 - 5 projects that is opposite to this query: query2 = query.annotate(Count('categories')) what return me: project1 - 2categories project2 - 7categories how can i make it in django ORM?

    Read the article

  • What's missing in ASP.NET MVC?

    - by LukaszW.pl
    Hello stackoverflow, I think there are not many people who don't think that ASP.NET MVC is one of the greatest technologies Microsoft gave us. It gives full control over the rendered HTML, provides separation of concerns and suits to stateless nature of web. Next versions of framework gaves us new features and tools and it's great, but... what solutions should Microsoft include in new versions of framework? What are biggest gaps in comparison with another web frameworks like PHP or Ruby? What could improve developers productivity? What's missing in ASP.NET MVC?

    Read the article

  • Mmap and structure

    - by blid..pl
    I'm working some code including communication between processes, using semaphores. I made structure like this: typedef struct container { sem_t resource, mutex; int counter; } container; and use in that way (in main app and the same in subordinate processes) container *memory; shm_unlink("MYSHM"); //just in case fd = shm_open("MYSHM", O_RDWR|O_CREAT|O_EXCL, 0); if(fd == -1) { printf("Error"); exit(EXIT_FAILURE); } memory = mmap(NULL, sizeof(container), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); ftruncate(fd, sizeof(container)); Everything is fine when I use one of the sem_ functions, but when I try to do something like memory->counter = 5; It doesn't work. Probably I got something wrong with pointers, but I tried almost everything and nothing seems to work. Maybe there's a better way to share variables, structures etc between processes ? Unfortunately I'm not allowed to use boost or something similiar, the code is for educational purposes and I'm intentend to keep as simple as it's possible.

    Read the article

  • How to setup Expression Blend 3 add-in window at certain position ?

    - by j23tom..pl
    For example in Sketchflow add-in there is ApplicationFlowPane (derrived from PrototypingPane) which registers itself using IWindowService like this: service.RegisterPalette(this.PaletteRegistryName, this, this.Caption, this.KeyBinding); But i can't see where it is defined that it is docked on bottom pane. Before someone replies that it's at: %AppData%\Microsoft\Expression\Blend3\Workspaces No it's not there because those files do not exists at first run. The question is how can i put my window at certain position with Expression Blend 3 plug-in api ? update 1: It seems that to achive what i want i have to change design.xaml (where workspaces are defined) which is loaded from satellite assembly Microsoft.Expression.Blend.resources.dll (method load in class FrameworkPackage in Microsoft.Expression.Blend.dll). But since this dll is strongly named i can't change it. So now the question is. Is there any other way I can change Design Workspace at runtime ?

    Read the article

  • Creating my own kill cam

    - by DalexL
    I plan on creating my own kill cam system for a sandbox tool set. After thinking about the mechanics of the kill cam itself, however, I'm quite lost. I'm trying to recreate the ones commonly seen in call of duty games that show, from the view of the killer, the actual killing scene. My Thoughts: -I can't just keep in memory when people kill others because I wouldn't know when to start the 'recording process'. There is on way for me to accurately determine when somebody is 'about' to kill someone. -My only real idea so far is to have a complete duplicate of everything loaded off to the side copying all the movement from the original world but with a 10 second delay. That way, all the kill cams would be 10 seconds long and the persons camera would just be moved to the second world of their killer. My Questions: Is there already an accepted way to do this? Does anybody have any good ideas for something like this? Thanks if you can!

    Read the article

  • Developing For Windows Phone 7 Series with XNA 4.0

    - by Chris Williams
    I have a talk submitted to the Heartland Developers Conference. It's called: Developing For Windows Phone 7 Series with XNA 4.0 Here's a description: Forget Droid, Windows Phone 7 Series is the iPhone killer. If you want to learn to build killer touch-based apps for this next generation mobile device then this is the session for you. We’ll go over phone specific features and how to leverage those features with XNA 4.0 and C# I need your votes in order to give this talk. Please go here: http://www.heartlanddc.com/?p=273 and give the talk a nice high rating to indicate interest. Thanks a bunch!!

    Read the article

  • Why Android for new (micro) consoles?

    - by Klaim
    There are a lot of new (micro) consoles with Android inside coming soon or already there (OUYA for example). My question is: why use Android and not another OS as base for these consoles? I assume that there are pragmatic answers to this but I can't see any clear killer feature. For example, one can assume that any stable Linux distribution would work (like Valve seem to think). Android is primarily targetted at mobile platforms which mean it is built around the idea of being interrupted which goes against a lot of what console devs needs in new hardware - but is not killing Android as a platform for gamedev either as it's just a constraint. Why not another OS? What's the Android killer features that make micro-console builder using it instead of Linux or anything else?

    Read the article

  • AWStats on Plesk consumes all of CPU and crashes server - how do you disable plesk

    - by columbo
    I have Plesk 9.0.1 running on a Red Hat server. Every week or so at about 4:10 AM the server locks up. At this time the server CPU usage shoots from 4% to 90% at the same time as a mass of awstats.pl processes start (I can't see how many as my datat only shows the top 30 processes, but all of these are awstats.pl). I turned off awstats through the Plesk control panel for all but 5 domains but I still get 90% CPU usage and at least 30 instances of awstats.pl happening at 4:10am as usual. Does anyone know why this may be? Does anyone know how to disable awstats (I have stats covered using piwik)? Or how do I uninstall awstats without snarling up Plesk?

    Read the article

  • How to resolve these errors and install ClamAV for Perl under Ubuntu/Debian?

    - by Alex R
    After successful apt-get install clamav I then did: perl -MCPAN -e shell install File::Scan::ClamAV and got CPAN.pm: Going to build J/JA/JAMTUR/File-Scan-ClamAV-1.91.tar.gz Cannot find clamd in /root/bin (or a number of other places) - are you sure clamav in installed? Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site] JAMTUR/File-Scan-ClamAV-1.91.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Failed during this command: JAMTUR/File-Scan-ClamAV-1.91.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512 What did I do wrong?

    Read the article

  • AWStats on Plesk consumes all of CPU and crashes server - how do you disable plesk.

    - by columbo
    Hello, I have Plesk 9.0.1 running on a Red Hat server. Every week or so at about 4:10am the server locks up. At this time the server CPU usage shhots from 4% to 90% at the same time as a mass of awstats.pl processes start (I can't see how many as my datat only shows the top 30 processes, but all of these are awstats.pl). I turned off awstats through the Plesk control panel for all but 5 domains but I still get 90% CPU usage and at least 30 instances of awstats.pl happening at 4:10am as usual. Does anyone know why this may be? Does anyone know how to disable awstats (I have stats covered using piwik)? Thanks

    Read the article

  • new vhost - main host AWstats

    - by vn
    Hi, I just began working at this new job and I have to config a new host for stats with awstats. I once used awstats on my own server, no biggie. Now, I'm on a multi-sites server with the acces_log files nicely splitted. I copied a awstats.conf file from one of the sites that already has (working) stats. I changed the LogFile and SiteDomain values as mentioned from http://awstats.sourceforge.net/docs/awstats_setup.html#BUILD_UPDATE, saved the conf and ran the commands perl awstats.pl -config=mysite -update and perl awstats.pl -config=mysite -output -staticlinks awstats.mysite.html (yes I changed it with my infos...) PROBLEM IS : whenever I try to access the html file or the dynamic page (with the config option on awstats.pl like my working site does), I get the stats of the MAIN site from access.log itself (and not access_log-mysite) from what it says at the top of the page and from the hostname on the left tab (stats for mysite.com)... what did I do wrong? There's no errors from what I see... Thanks a lot for any help

    Read the article

  • How to exclude one subfolder from my RewriteRule Htaccess rules?

    - by tomaszs
    I have a .htaccess in my root of website that looks like this: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.mydomain\.pl [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?([a-z0-9_-]+)\.mydomain\.pl [NC] RewriteRule ^/?$ /index.php?run=places/%1 [L,QSA] RewriteCond %{REQUEST_URI} !^/index.php$ RewriteCond %{REQUEST_URI} !^/images/ RewriteCond %{REQUEST_URI} !^/upload/ RewriteCond %{REQUEST_URI} !^/javascript/ RewriteRule ^(.*)$ /index.php?runit=$1 [L,QSA] I've installed custom guest book in folder guests and now I would like to disable rules above for this one specific folder. So that when I type: mydomain.pl/guests I would like to go normally to actual folder guests. I understand that I need to somehow disable rules above for guests subfolder, but how do I do this?

    Read the article

  • SQL Developer: Describe versus Ctrl+Click to Open Database Objects

    - by thatjeffsmith
    In yesterday’s post I talked about you could use SQL Developer’s Describe (SHIFT+F4) to open a PL/SQL Package at your cursor. You might get an error if you try to describe this… If you actually try to describe the package as you see it in the above screenshot, you’ll get an error: Doh! I neglected to say in yesterday’s post that I was highlighting the package name before I hit SHIFT+F4. This works just fine, but it will work even better in our next release as we’ve fixed this issue. Until then, you can also try the Ctrl+Hover with your mouse. For PL/SQL calls you can open the source immediately based on what you’re hovering over with your mouse cursor. You could try this with “dbms_output.put_line(” too Ctrl+Click, It’s not just for PL/SQL If you don’t like the floating describe windows you get when you do a SHIFT+F4 on a database object, the ctrl+click will work too. Instead of opening a normal ‘hover’ panel, you’ll be taken directly to the object editor for that table, view, etc. Go ahead and try it right now. Paste this into your worksheet, then ctrl+click with your mouse over the table name: select * from scott.emp And now you know, the rest of the story.

    Read the article

  • Special Value Sets in Oracle Applications

    - by Manoj Madhusoodanan
    Here I am going to explain Special Value Sets in Oracle Applications.I have a requirement in which I want to execute a BIP report with some parameters. The first parameter Current Month should allow only MON-YYYY format.Schedule Start Date and Schedule End Date should be with in first parameter month. Approach 1If the report is through PL/SQL Stored Procedure executable the we can do all the validation in backend. Approach 2Second approach is through Special Value Sets.This value set has events like Edit,Load and Validate.We can attach PL/SQL code snippet to each event.Here I am going to attach validation routine to Validate event to validate the user input.Validate event fires when the focus leaves from the item. Here I am going to create two special value sets ( one for first parameter and another for the second and third parameter). Value Set 1Name : XXCUST_CURRENT_MONTHList Type : List of ValuesFormat Type : CharMaximum Size : 8Validation Type : SpecialEvent : ValidateFunction : XXCUST_CURRENT_MONTH_VALIDATE_ROUTINEValue Set 2Name : XXCUST_DATESList Type : List of ValuesFormat Type : Standard DateValidation Type : SpecialEvent : ValidateFunction : XXCUST_DATES_VALIDATE_ROUTINE Note: Inside the validate routine I am using FND messages.Generate message file also using "FNDMDGEN apps/password 0 Y US XXCUST DB_TO_RUNTIME". Attach XXCUST_CURRENT_MONTH to first parameter.Also XXCUST_DATES to second and third parameter. Note: Since the program is using Special Value Sets it can be submit only through Oracle Forms.Submission through OA Framework and PL/SQL APIs are not recommended. OutputGive Current Date as 01-2012 Give Schedule Start Date out of current month.

    Read the article

  • Perl Moose::Util::TypeConstraints bug ? what is this error about the name has invalid chars ?

    - by alex8657
    That has been hours i am tracking a Moose::Util::TypeConstraints exceptions, i don't understand where it gets to check a type and tells me that the name is incorrect. I tracked the error to a reduced example to try to locate the problem, and it just shows me that i do not get it. Did i get to a Moose::Util::TypeConstraints bug ? aoffice:new alex$ perl -c ../codesnippets/typeconstrainterror.pl ../codesnippets/typeconstrainterror.pl syntax OK aoffice:new alex$ perl -d ../codesnippets/typeconstrainterror.pl (...) DB<1> r Something::File::LocalFile=HASH(0x100d1bfa8) contains invalid characters for a type name. Names can contain alphanumeric character, ":", and "." at /opt/local/lib/perl5/vendor_perl/5.10.1/darwin-multi-2level/Moose/Util/TypeConstraints.pm line 508 Moose::Util::TypeConstraints::_create_type_constraint('Something::File::LocalFile=HASH(0x100d1bfa8)', undef, undef, undef, undef) called at /opt/local/lib/perl5/vendor_perl/5.10.1/darwin-multi-2level/Moose/Util/TypeConstraints.pm line 285 Moose::Util::TypeConstraints::type('Something::File::LocalFile=HASH(0x100d1bfa8)') called at ../codesnippets/typeconstrainterror.pl line 7 Something::File::is_slink('Something::File::LocalFile=HASH(0x100d1bfa8)') called at ../codesnippets/typeconstrainterror.pl line 33 Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. Below, the code that crashes: package Something::File; use Moose; has 'type' =>(is=>'ro', isa=>'Str', writer=>'_set_type' ); sub is_slink { my $self = shift; return ( $self->type eq 'slink' ); } no Moose; __PACKAGE__->meta->make_immutable; 1; package Something::File::LocalFile; use Moose; use Moose::Util::TypeConstraints; extends 'Something::File'; subtype 'PositiveInt' => as 'Int' => where { $_ >0 } => message { 'Only positive greater than zero integers accepted' }; no Moose; __PACKAGE__->meta->make_immutable; 1; my $a = Something::File::LocalFile->new; # $a->_set_type('slink'); print $a->is_slink ." end\n";

    Read the article

  • Perl regex matching output from `w -hs` command

    - by Bushman
    I'm trying to write a Perl script that will work better with KDE's kwrited, which, as far as I can tell, is connected to a pts and puts every line it receives through the KDE system tray notifications, with the title "KDE write daemon". Unfortunately, it makes a separate notification for each and every line, so it spams up the system tray with multiline messages on regular old write, and for some reason it cuts off the entire last line of the message when using wall (One-line messages are also goners.). I was also hoping to make it so that it could broadcast across a LAN with thick clients. Before starting on that (which would require ssh, of course), I tried to make an ssh-less version to make sure it works. Unfortunately, it doesn't. perl ./write.pl "Testing 1 2 3" where the following is the contents of ./write.pl: #!/usr/bin/perl use strict; use warnings; my $message = ""; my $device = ""; my $possibledevice = '`w -hs | grep "/usr/bin/kwrited"`'; #Where is kwrited? $possibledevice =~ s/^[^\t][\t]//; $possibledevice =~ s/[\t][^\t][\t ]\/usr\/bin\/kwrited$//; $possibledevice = '/dev/'.$possibledevice; unless ($possibledevice eq "") { $device = $possibledevice; } if ($ARGV[0] ne "") { $message = $ARGV[0]; $device = $ARGV[1]; } else { $device = $ARGV[0] unless $ARGV[0] eq ""; while (<STDIN>) { chomp; $message .= <STDIN>; } } if ($message ne "") { system "echo \'$message\' > $device"; } else { print "Error: empty message" } produces the following error: $ perl write.pl "Testing 1 2 3" Use of uninitialized value $device in concatenation (.) or string at write.pl line 29. sh: -c: line 0: syntax error near unexpected token `newline' sh: -c: line 0: `echo 'foo' > ' Somehow, the regular expressions and/or the backtick escape in processing $possibledevice are not working properly, because where kwrited is connected to /dev/pts/0, the following works perfectly: $ perl write.pl "Testing 1 2 3" /dev/pts/0

    Read the article

  • Adding a valuetype to IDL, compile and it fails with "No factory found"

    - by jim
    I can't figure out why the client keeps complaining about the not finding the factory method. I've tried the IDL with and without the "factory" keyword and that didn't change the behavior. The SDMGeoVT IDL matches other objects used (which run successfully). The SDMGeoVT classes generated match other generated classes in regards to inheritance and methods. The IDL is as follows; The idlj compiler runs w/o error. I implement the function on the server and I see the server code run and serialize the object over the wire (the server code runs fine). The client bombs with the following stack trace (the first couple of lines is from the jacORB library). I've created a small app just to compile and test the code (ArrayClient & ArrayServer). The base app (from the jacORB demo) works fine. I've tried using the base class OFBaseVT and a single object (SDMGeoVT vs the list return) and have the same issue. 2010-05-27 15:37:11.813 FINE read GIOP message of size 100 from ClientGIOPConnection to 127.0.0.1:47030 (1e4853f) 2010-05-27 15:37:11.813 FINE read GIOP message of size 100 from ClientGIOPConnection to 127.0.0.1:47030 (1e4853f) org.omg.CORBA.MARSHAL: No factory found for: IDL:pl/SDMGeoVT:1.0 at org.jacorb.orb.CDRInputStream.read_untyped_value(CDRInputStream.java:2906) at org.jacorb.orb.CDRInputStream.read_typed_value(CDRInputStream.java:3082) at org.jacorb.orb.CDRInputStream.read_value(CDRInputStream.java:2679) at com.helloworld.pl.SDMGeoVTHelper.read(SDMGeoVTHelper.java:106) at com.helloworld.pl.SDMGeoVTListHelper.read(SDMGeoVTListHelper.java:51) at com.helloworld.pl._PLManagerIFStub.getSDMGeos(_PLManagerIFStub.java:28) at com.helloworld.ArrayClient.<init>(ArrayClient.java:40) at com.helloworld.ArrayClient.main(ArrayClient.java:125) valuetype SDMGeoVT : common::OFBaseVT{ private string sdmName; private string zip; private string atz; private long long primaryDeptId; private string deptName; factory instance(in string name,in string ZIP,in string ATZ,in long long primaryDeptId,in string deptName,in string name); string getZIP(); void setZIP(in string ZIP); string getATZ(); void setATZ(in string ATZ); long long getPrimaryDeptId(); void setPrimaryDeptId(in long long primaryDeptId); string getDeptName(); void setDeptName(in string deptName); }; typedef sequence<SDMGeoVT> SDMGeoVTList; interface PLManagerIF : PublicManagerIF { pl::SDMGeoVTList getSDMGeos(in framework::ITransactionHandle tHandle, in long long productionLocationId); };

    Read the article

  • Code to connect to remote server using perl

    - by user304852
    I'm written small code to connect to remote server using perl but observing error messages #!/usr/bin/perl -w use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>60, Errmode=>'die'); $telnet->open('192.168.50.40'); $telnet->waitfor('/login:/'); $telnet->print('queen'); $telnet->waitfor('/password:/'); $telnet->print('kinG!'); $telnet->waitfor('/:/'); $telnet->print('vol >> C:\result.txt'); $telnet->waitfor('/:/'); $telnet->cmd("mkdir vol"); $telnet->print('mkdir vol234'); $telnet->cmd("mkdir vol1"); $telnet->waitfor('/\$ $/i'); $telnet->print('whoamI'); print $output; But while running i'm getting following errors C:\>perl -c E:\test\net.pl E:\test\net.pl syntax OK C:\>perl E:\test\net.pl command timed-out at E:\test\net.pl line 13 C:\> Help me in this regard.. i'm not much aware of perl

    Read the article

  • Why does my Net::Telnet program timeout?

    - by user304852
    I'm written small code to connect to remote server using Perl but observing error messages #!/usr/bin/perl -w use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>60, Errmode=>'die'); $telnet->open('192.168.50.40'); $telnet->waitfor('/login:/'); $telnet->print('queen'); $telnet->waitfor('/password:/'); $telnet->print('kinG!'); $telnet->waitfor('/:/'); $telnet->print('vol >> C:\result.txt'); $telnet->waitfor('/:/'); $telnet->cmd("mkdir vol"); $telnet->print('mkdir vol234'); $telnet->cmd("mkdir vol1"); $telnet->waitfor('/\$ $/i'); $telnet->print('whoamI'); print $output; But while running i'm getting following errors C:\>perl -c E:\test\net.pl E:\test\net.pl syntax OK C:\>perl E:\test\net.pl command timed-out at E:\test\net.pl line 13 C:\> Help me in this regard.. i'm not much aware of perl

    Read the article

  • No coverage for runtime with Devel::Cover and ModPerl::Registry

    - by codeholic
    When I'm running Devel::Cover with ModPerl::Registry, I get no coverage info except for BEGIN blocks. When I'm running the same script with Devel::Cover from command line or as a CGI, everything works alright (obviously). How can I make Devel::Cover "see" my code being executed in the runtime? Here's Devel::Cover related stuff in my httpd.conf: MaxClients 1 PerlSetEnv DEVEL_COVER_OPTIONS -db,/tmp/cover_db,silent,1 PerlRequire /var/www/project/startup.pl Here's startup.pl: #!/usr/bin/perl use strict; use warnings; use Apache2::Directive (); use File::Basename (); use File::Find (); BEGIN { # Devel::Cover database must be writable by worker processes my $conftree = Apache2::Directive::conftree->as_hash; my $name = $conftree->{User} or die "couldn't find user in Apache config"; print "user=$name\n"; my $uid = getpwnam($name); defined $uid or die "couldn't determine uid by name"; no warnings 'redefine'; local $> = $uid; require Devel::Cover; my $old_report = \&Devel::Cover::report; *Devel::Cover::report = sub { local $> = $uid; $old_report->(@_) }; Devel::Cover->import; } 1; (As you may see, I made a monkey patch for Devel::Cover since startup.pl is being run by root, but worker processes run under a different user, and otherwise they couldn't read directories created by startup.pl. If you know a better solution, make a note, please.)

    Read the article

  • SWI-Prolog as an embedded application in VS2008 C++

    - by H.J. Miri
    I have a C++ application (prog.sln) which is my main program and I want to use Prolog as an embedded logic server (hanoi.pl) int main(int argc, char** argv) { putenv( "SWI_HOME_DIR=C:\\Program Files\\pl" ); argv[0] = "libpl.dll"; argv[1] = "-x"; argv[2] = "hanoi.pl"; argv[3] = NULL; PL_initialise(argc, argv); { fid_t fid = PL_open_foreign_frame(); predicate_t pred = PL_predicate( "hanoi", 1, "user" ); int rval = PL_call_predicate( NULL, PL_Q_NORMAL, pred, 3 ); qid_t qid = PL_open_query( NULL, PL_Q_NORMAL, pred, 3 ); while ( PL_next_solution(qid) ) return qid; PL_close_query(qid); PL_close_foreign_frame(fid); system("PAUSE"); } return 1; system("PAUSE"); } Here is my Prolog source code: :- use_module( library(shlib) ). hanoi( N ):- move( N, left, center, right ). move( 0, _, _, _ ):- !. move( N, A, B, C ):- M is N-1, move( M, A, C, B ), inform( A, B ), move( M, C, B, A ). inform( X, Y ):- write( 'move a disk from ' ), write( X ), write( ' to ' ), write( Y ), nl. I type at the command: plld -o hanoi prog.sln hanoi.pl But it doesn't compile. When I run my C++ app, it says: Undefined procedure: hanoi/1 What is missing/wrong in my code or at the prompt that prevents my C++ app from consulting Prolog? Appreciate any help/pointer.

    Read the article

  • delayed evaluation of code in subroutines - 5.8 vs. 5.10 and 5.12

    - by Brock
    This bit of code behaves differently under perl 5.8 than it does under perl 5.12: my $badcode = sub { 1 / 0 }; print "Made it past the bad code.\n"; [brock@chase tmp]$ /usr/bin/perl -v This is perl, v5.8.8 built for i486-linux-gnu-thread-multi [brock@chase tmp]$ /usr/bin/perl badcode.pl Illegal division by zero at badcode.pl line 1. [brock@chase tmp]$ /usr/local/bin/perl -v This is perl 5, version 12, subversion 0 (v5.12.0) built for i686-linux [brock@chase tmp]$ /usr/local/bin/perl badcode.pl Made it past the bad code. Under perl 5.10.1, it behaves as it does under 5.12: brock@laptop:/var/tmp$ perl -v This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi brock@laptop:/var/tmp$ perl badcode.pl Made it past the bad code. I get the same results with a named subroutine, e.g. sub badcode { 1 / 0 } I don't see anything about this in the perl5100delta pod. Is this an undocumented change? A unintended side effect of some other change? (For the record, I think 5.10 and 5.12 are doing the Right Thing.)

    Read the article

  • Rename a file with perl

    - by perlnoob
    I have a file in a different folder I want to rename in perl, I was looking at a solution earlier that showed something like this: for (<backup.rar>) { my $file = $_; my $new = $_ 'backup'. @test .'.rar'; rename $file, $new or die "Error, can not rename $file as $new: $!"; } however backup.rar is in a different folder, I did try putting "C:\backup\backup.rar" in the < above, however I got the same error. C:\Program Files\WinRARperl backup.pl String found where operator expected at backup.pl line 35, near "$_ 'backup'" (Missing operator before 'backup'?) syntax error at backup.pl line 35, near "$_ 'backup'" Execution of backup.pl aborted due to compilation errors. I was using # Get time my @test = POSIX::strftime("%m-%d-%Y--%H-%M-%S\n", localtime); print @test; To get the current time, however I couldn't seem to get it to rename correctly. What can I do to fix this? Please note I am doing this on a windows box.

    Read the article

  • Perl - MySQL connection problem in windows

    - by dexter
    I have two folders php and perl they contain index.php and index.pl respectivly in index.pl my perl code looks like: #!/usr/bin/perl use Mysql; print "Content-type: text/html\n\n"; print "<h2>PERL-mySQL Connect</h2>"; print "page info"; $host = "localhost"; $database = "cdcol"; $user = "root"; $password = ""; $db = Mysql->connect($host, $database, $user, $password); $db->selectdb($database); when i run above code (ie type: http://localhost:88/perl/ in browser) following error comes Error message: Can't locate Mysql.pm in @INC (@INC contains: C:/xampp/perl/site/lib/ C:/xampp/perl/lib C:/xampp/perl/site/lib C:/xampp/apache) at C:/xampp/htdocs/perl/index.pl line 2. BEGIN failed--compilation aborted at C:/xampp/htdocs/perl/index.pl line 2. while this works: in browser http://localhost:88/php/ where index.php has: <?php $con = mysql_connect("localhost","root",""); if($con) { if(mysql_select_db("cdcol", $con)) { $sql="SELECT Id From products"; if(mysql_query($sql)) { $result = mysql_query($sql); if ($result)............

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >