GET

HeYa all again,

Bumped into another problem. Not sure if this is the right place to ask, but
someone might have encountred this here. It seems that if you give a long
arg to open on winXP{ extanding MAX_CANNON on command prompt } it will get
broken into lines. Does anyone know how to fix it ? Here is how to recreat,

$Val="msft";
open FH,"GET
http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=$Val |";

while(<FH>){
 print $_;
}

Thanx in advance,
Mark


0
mgoland
10/29/2002 2:23:46 AM
perl.beginners 29368 articles. 3 followers. Follow

3 Replies
726 Views

Similar Articles

[PageSpeed] 36

On Oct 28, Mark Goland said:

>Bumped into another problem. Not sure if this is the right place to ask, but
>someone might have encountred this here. It seems that if you give a long
>arg to open on winXP{ extanding MAX_CANNON on command prompt } it will get
>broken into lines. Does anyone know how to fix it ? Here is how to recreat,

I think the problem is that the argument contains certain characters (like
? and &, perhaps) in it.  If you have 'GET', you probably also have
LWP::Simple.

  use LWP::Simple 'get';
  $content = get
    "http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=$Val";

Or else quote the argument:

  open FH,
    "GET 'http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=$Val' |";

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]

0
japhy
10/29/2002 3:50:22 AM
i'm confused.  i don't have XP and cannot see how this can work.  is GET a
shell function or am i missing something simple here?  that said, if you are
trying to get stuff off the web best to use the LWP modules, say LWP::Simple
eg.

<eg>
use strict;
use warnings;
use LWP::Simple;

getprint("http://www.perl.com/");
</eg>


> -----Original Message-----
> From: Mark Goland [mailto:mgoland@optonline.net]
> Sent: Tuesday, October 29, 2002 1:24 PM
> To: perl
> Subject: GET
> 
> 
> HeYa all again,
> 
> Bumped into another problem. Not sure if this is the right 
> place to ask, but
> someone might have encountred this here. It seems that if you 
> give a long
> arg to open on winXP{ extanding MAX_CANNON on command prompt 
> } it will get
> broken into lines. Does anyone know how to fix it ? Here is 
> how to recreat,
> 
> $Val="msft";
> open FH,"GET
> http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=$Val |";
> 
> while(<FH>){
>  print $_;
> }
> 
> Thanx in advance,
> Mark
> 
> 
> 
> -- 
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> 
0
toby
10/29/2002 3:54:52 AM
GET is a standard util that comes with perl. Problem with quoting the
arguments is that it brings into play the problem with certain characters
(like? and &, perhaps). The fix from command line is to put it in quotes,
there for I really think the problem is with MAX_CANNON.Any Idea's ??

----- Original Message -----
From: "Jeff 'japhy' Pinyan" <japhy@perlmonk.org>
To: "Mark Goland" <mgoland@optonline.net>
Cc: "perl" <beginners@perl.org>
Sent: Monday, October 28, 2002 10:50 PM
Subject: Re: GET


> On Oct 28, Mark Goland said:
>
> >Bumped into another problem. Not sure if this is the right place to ask,
but
> >someone might have encountred this here. It seems that if you give a long
> >arg to open on winXP{ extanding MAX_CANNON on command prompt } it will
get
> >broken into lines. Does anyone know how to fix it ? Here is how to
recreat,
>
> I think the problem is that the argument contains certain characters (like
> ? and &, perhaps) in it.  If you have 'GET', you probably also have
> LWP::Simple.
>
>   use LWP::Simple 'get';
>   $content = get
>     "http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=$Val";
>
> Or else quote the argument:
>
>   open FH,
>     "GET
'http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=$Val' |";
>
> --
> Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
> RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
> ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
> <stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
> [  I'm looking for programming work.  If you like my work, let me know.  ]
>
>


0
mgoland
10/29/2002 4:30:58 AM
Reply:

Similar Artilces:

Beginner of Beginner getting an error
Hi Guys, I have this script: #!/usr/bin/perl # track, find email addresses in emails, # writes them to /var/opt/ITrootmail/bad/ with a date # set up as a pipe for procmail or use with Pine $now = `date`; # find included email-like addresses while ($line = <STDIN>) { if ($line =~ /\b([\w_\-\.]+ at [\w_\-\.]+)\b/) { # exclude email addresses not needed (next) if ( $1 =~ /\d{8,}/ ); (next) if ( $1 =~ /postmaster/i ); (next) if ( $1 =~ /DAEMON/i ); ...

POST GET GET GET GET... WTH?
Hi, I'm at a loss to explain this... I have an ASPX page that I can't always navigate to. When I developed the app (it's Starter Kit Portal-based), I did it on my LAN and have had no trouble accessing the page. However, upon deployment, I see the following behavior: 1. POST request goes out looking for MyForm.aspx 2. GET request for MyForm.aspx 3. GET request for MyForm.aspx 4. ... X. GET request Sometimes, the page finally loads. Other times, it just ends up blank. Many times, it doesn't load at ALL the first POST - I just get a "The pa...

Getting Rid of Frames (beginner help)
Hello all, I've run into an issue when it comes to the basic design of my web application.  I'm got some experience in windows application development, and the move to the web development has been... interesting. I've begun work on a simple web application and I've run into a wall when it comes to different ways to implement it.  Basically, I know the "what", but not the "how".  The basic layout is fairly simple and I see it everywhere.  I'll describe it best I can.Table with three rows.Top row spans 2 columns, and is the h...

Cannot get AJAX working properly (beginner)
 I have been using Visual Studio 2005 for some time now.  I recently downloaded the Ajax Control Toolkit and Ajax Control Toolkit Framework both of which downloaded fine.   The problem is that there is no "ASP.NET Ajax Website" under my templates, only "Ajax Control Toolkit Website".  I can create an "Ajax Control Toolkit Website"  and use Ajax tags, but no Ajax extenders appear in the toolbox (in order for me to drag and drop).   The directions say to create a new  "ASP.NET Ajax Website" under my templates ...

Beginner needs help getting started
Hi all, I am new to this forum. I just bought a book to learn ASP.NET on my own. My computer has a fresh copy of Windows Server 2003 Standard, IIS 6.0, Application Server installed. Basic html pages load fine, but when I tried to load a simple .aspx page, I get the following error. Any ideas?  Server Error in '/' Application. Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\2135a508\8d69a834" is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for mo...

Help Please - Beginner Here
Back in the 'old' days, when I used to be primarily IT focused, I was in on the development of our corporate architectures, building WAN's, etc. I've built a few microcenter networks, linked with our corporate WAN, but we never connected to the internet. Now, about 5 years out of the loop, I'm a new internet dandy. I've just setup a local network at my home, connecting two PC's with the Linksys hub, and uplinking from my new 4 port BEFSR41 router - which has a WAN link via cable modem. I can now access the internet via the router on all the PC's at...

Beginner needs help getting GW6 email remotely
Now that we have GW6 setup & working great for a couple of months, I want to know how I can access my email from outside the office. We have NW6 with GW6 on it, connected to a Watchguard router/firewall connected to DSL. Being a non-tech (accountant), can you tell me how to go about getting remote email access? Is that webaccess? How do I set it up? Thanks. Yes WebAccess is the ticket. Assuming you have a good feel of your technical ability, why not bring in local talent and have them teach you the installation if you want to learn, or just do it for you. There are a ...

Beginner question
Hi, I've done a bad thing. I've just installed OpenSUSE 11.1 a couple of days ago, and I was playing about with options on the login screen without a clue what I was doing. One menu gave me the choice (I think) GNOME / IceVM / TVM. I chose TVM, just to see what it was. Result: it never finished loading - got to a plain blue screen and did nothing more. Now, every time I try to boot it does the same. Is there any way for me to force the system to take me back to the login screen during bootup (it's a single-user machine, so it doesn't do this automatically), s...

Get LastLoginDate BEFORE it gets updated
I am after a way to get the LastLoginDate before it gets updated when a user logs on. The reason is that i want to provide a list of all changes that have been done since they last logged on. When i use OnLoggingIn it appears that the LastLoginDate has already been updated (with the new Login Date). I have tried numerous ways but am a little stumped.  Any help will be greatly appriciated. Try this -  Dim LastloginDate As Date Protected Sub Login1_LoggingIn(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.LoginCancelEventArgs) Handles Login1.LoggingIn ...

How do I get rid of this mozL10n.get()?
So I have a few strings that contains arguments that also needs to be translated https://github.com/mozilla-b2g/gaia/blob/42e93d96ea245c778885b1889b3da589f5342fb1/apps/keyboard/locales/keyboard.en-US.properties#L77 And at the time of writing the code I ended up using mozL10n.get(). https://github.com/mozilla-b2g/gaia/blob/42e93d96ea245c778885b1889b3da589f5342fb1/apps/keyboard/js/settings/layout_item_view.js#L263-L265 Do we already have support on this? The answer is probably obvious if there is already one. The status itself is one <span> element which I prefer not to break...

Get All & Get all mail
Is there any difference between these two extensions? Daniel -- _____________________________________ Daniel Royer University of Geneva daniel at royer dot ch _Daniel Royer_ spoke thusly on 11/09/2006 4:31 AM: > Is there any difference between these two extensions? I can't seem to find a "Get All" extension for Thunderbird. The closest I've found is <http://extensionroom.mozdev.org/more-info.php/getmess>, which is not written to the extension manager API, that was implemented long before Thunderbird 1.0. If that's what you were referri...

Complete beginner can't get Sendmail to work
my sendmail.pm file (stored in the SYS\Perl\lib\Mail directory) has the fol= lowing line: $default_smtp_server =3D '192.9.200.222'; my formmail.pl file refers to the sendmail file with the following line: $mailprog =3D '/perl/lib/Mail'; Can anyone see anything wrong with these lines of code? Is it possible to test sendmail.pm without using another script? ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity ...

Get get HotSync to work
Hi, I'm having problems synchronizing my custom Ultra-Lite application. After a HotSync the log file looks as follows: HotSync operation started 11/06/01 03:47:36 PM Expense - sync configured to Do Nothing Outlook Calendar - sync configured to Do Nothing Outlook Contacts - sync configured to Do Nothing Outlook Tasks - sync configured to Do Nothing Outlook Notes - sync configured to Do Nothing Unable to open the stream 11/06/01 03:47:40 PM OK PalmTCS (Adaptive Server Anywhere Conduit) with 1 message(s) 11/06/01 03:47:40 PM OK System Yet, the MobilLink Server still says:...

Getting variables from a post or get?
Sorry for the newbie post, but i am from a PHP world. Im now learning ASP.NET.Im having a bit of problem figuring out how to get/post a variable on an input field. All i want to do is, get the value from an input form and display it again on the page. Here's my code.. <form id="form1" runat="server" acceptcharset="utf-8"> Your name: <input id="name" name="name" type="text" /> <asp:Button ID="Button1" runat="server" Text="Button" PostBackUrl="Default.aspx" /> </form> All i want is to get the value of name and display it on the page it self. How can i do that...

Beginner doing first exercise, can't get my page to run.
 I did the very first exercise, FTPed it to our web site, and got the error below.  I changed the web site name to OurWebSite.com because my boss insists I don't ever post our web site in a public forum, but everything else is from my browser.  I looked at line 51 of the web config file and it doesn't have the text shown below.  Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review th...

Web resources about - GET - perl.beginners

Laquan McDonald Video: 17-Year-Old Laquan Shot 16 Times – #LaquanMcDonald ‘Thug, Riot, Live Stream’ Trends ...
The video of Laquan McDonald getting shot by Officer Jason Van Dyke has finally been released, one day before the November 25, 2015, deadline ...

Expert: 20 Percent of Islamic State Converts Were Christian
Terrorism expert says about 20 percent of Islamic State recruits are from Christian families

Beginning Of World War 3? Russian War Jet Downed On Turkey-Syria Border Sparks Talk
Several media outlets, such as Business Insider and CNN , are discussing the downing of a Russian war jet by a Turkish F-16 near the Turkey-Syria ...

Apple Has Acquired Faceshift, Maker Of Motion Capture Tech Used In Star Wars
TechCrunch : Apple Has Acquired Faceshift, Maker Of Motion Capture Tech Used In Star Wars — As the market for virtual reality technology continues ...

Google Drive updated with support for 3D Touch and iPad multitasking
The official iOS app of Google Drive , the eponymous tech giants popular file storage and syncing service , has just been updated with several ...

Jeff Bezos is proud of his rocket, Elon Musk not impressed
Amazon Founder and CEO Jeff Bezos saw his private spaceflight company, Blue Origin, hit a major milestone today by launching and landing its ...

Everyone Bought Adele's New Album '25' This Week
Hello, it’s Adele. She was wondering if after all of these days you had bought “25,” because everyone else has. According to Billboard, “25” ...

Feature Request: How Apple can better optimize iOS for iPad Pro
Feature Request is a new regular 9to5Mac series where authors offer their opinion on how to improve popular hardware or software products. Before ...

PCs running Dell support app can be uniquely ID’d by snoops and scammers
Enlarge On Monday, Ars reported that Dell was shipping PCs that came preinstalled with digital certificates that made it easy for attackers ...

Amazon May Not Have Requested That NYC Yank Nazi-Themed Ads
Did Amazon Studios really request that its controversial New York City subway ads for the ambitious drama “The Man In The High Castle” be removed? ...

Resources last updated: 11/25/2015 5:26:41 AM