Hatena::Groupperl

perl初心者

2008-12-31

指定したディレクトリの特定の名前のファイルを削除する

15:30

指定したディレクトリの特定の名前のファイルを削除するスクリプトを作ってみました。

削除するファイル名は「***(1).mp3」のようなmp3ファイルで、( )内の数字は1桁の数値が入っています。

#! /bin/perl -w
use strict;

my $dirname = 'C:\Documents and Settings\work';
opendir(DIR, $dirname) or die "$dirname: $!";
while (my $dir = readdir(DIR)) {
	next unless ($dir =~ /\(\d\)\.mp3$/);
	my $filename = $dirname.'\\'.$dir;
	print '削除ファイル ===== ', "$filename\n";
	unlink($filename);
	}
closedir(DIR);

opendirでディレクトリをディレクトリハンドル"DIR"に関連付けて、readdirで読み込みます。

正規表現のパターンマッチでファイルを選別して、削除しています。

  

readdirで読み込むのがディレクトリエントリというのが理解できなくて、unlink($dir);として、動作しなくて少し悩みました。unlink($dir);だとカレントディレクトリの$dirというファイルが削除されるんですね。

my $filename = $dirname.'\\'.$dir;のようにして、きちんとファイルを指定する必要がありました。

  

はてなスターありがとうございます。Uchimataさん。

EnvippinoEnvippino2017/05/27 22:51It will be easier for you if they are going to explain the details about the item you are about to purchase. What can you do?"Benefits of Using Managed HostingBenefits of Using Managed HostingJune 7, 2012 Author: Dhruv Patel Posted in MarketingOnline businesses are easy to manage only when it is small. <a href=http://www.cheapchinanfljerseyswholesale.us.com/>Wholesale NFL Jerseys</a>.<a href=http://www.cheapchinanfljerseyswholesale.us.com/>Wholesale Jerseys From China</a>. Men and women can be in a position to seem stylish with this choice. Good Luck. There are also many other similar products and services offered over in The information you collect will help you know which ones offer ideal costs and payment choices.<a href=http://www.cheapchinanfljerseyswholesale.us.com/>Cheap NFL Jerseys</a>."I would give big money, but not for long years," Hamels said during a May conversation about the frailty of pitchers. You can rest assure on their quality of merchandise and services. With dedicated server, you do not have any loop holes in the internet security. The military will tell you to take the test but will not let you know what the test is about. Rigel continually updates themselves to be sure they can to give their customer the best and most up to date products. There are also others who are very comfortable with it.
Visit my site锟斤拷http://www.cheapchinanfljerseyswholesale.us.com/

EnvippinoEnvippino2017/06/15 01:42Number of View :118Many organizations do have a Human Resource team to assist them with the hiring of brand new staff to help grow and improve the crew. It just makes sense because most clubs have numerous activities which can be dangerous and can involve accidents and mishaps.Ultimately health is something we do to ourselves, <a href=http://www.cheapnfljerseyssportsshop.com/>Cheap Jerseys</a>, not something others do to us.Jamie Carragher, Graeme Souness and Jamie Redknapp have all been critical in their roles for Sky, though, when pressed, Rodgers would only say: “I am talking about people outside of here. Crank out confident that yourself reach your software program very carefully and pin issue the parts, which yourself do not desire. There are many people, that like to buy one of these brilliant items,<a href=http://www.cheapnfljerseyssportsshop.com/>Cheap NFL Jerseys Wholesale</a>, however they do not check with experts plus they do not read about the models on the web. once the height is as thick as the pad of yourforefinger, the height is proper. Otherwise, you could pull a muscle and be out of commission for a while. Some allow multiple links from the resource box; others only allow a couple of. That's when I thought I'd rather say something and hopefully catch this thing before I make the same mistake I made a couple of years ago, when I tried to play through it and made it worse. Your self must be guaranteed that by yourself are seeking into the info that an representative features your self with regards toward the agreement that your self are having into.<a href=http://www.cheapnfljerseyssportsshop.com/>Cheap NFL Jerseys China Wholesale</a>.Most people know the frustration and feeling of helplessness one experiences when one is in a hurry and suddenly forced to a crawling pace or standstill when the road is blocked due to an accident or construction work.
Visit my site:http://www.cheapnfljerseyssportsshop.com/

EnvippinoEnvippino2017/06/17 14:57The user can also have the chance to format the text, italics as well as the colors of such files. Just about all tattoo artists are aware of the great need of a great tattoo machine and every time demands good quality tattoo machines for superb work.You can stay on top of fashion by being unique.When you would be selecting the Bharatanatyam Los Angeles class, there would be many options that would be available. It is not going to be use ledgers that can add to the mess in your office. Accessories for your hair include scrunchies in a myriad of colors and fabrics, headbands, elegant barrettes, and even clip-on hair extensions. <a href=http://www.cheapnfloutletjerseys.us.com/>Cheap Jerseys</a>.Just have things throughout the dwelling that displays them you are the very best. Hit flat and decisively to the point if desired. Most of the breast pumps introduced to the market in the last year or so also have a space on them so that you can actually place your babies picture right in front of you too. Mordred, with a white face and hisarm in a sling, was leaning at the embrasure of one of the windows, looking out.<a href=http://www.cheapnfloutletjerseys.us.com/>Cheap NFL Jerseys</a>.<a href=http://www.cheapnfloutletjerseys.us.com/>Wholesale Jerseys</a>.
Visit my site锟斤拷http://www.cheapnfloutletjerseys.us.com/

EnvippinoEnvippino2017/06/20 15:16org today. When you feel like going casual, grab a ponytail holder and wear your hair back. Starting with your fingertips make slow circular movements towards your nipple finishing off with some larger movements and complete hand movements down the chest. These innocent pets depend on their owners to ensure they lead the best life possible. <a href=http://www.cheapnfljerseyschina-wholesale.us.com/>Wholesale Jerseys Free Shipping</a>.<a href=http://www.cheapnfljerseyschina-wholesale.us.com/>Cheap NFL Jerseys Outlet</a>. These days,<a href=http://www.cheapnfljerseyschina-wholesale.us.com/>Wholesale Nike NFL Jerseys</a>, people can make tattoos with the help of a tattoo kit as well as other products for tattoo artists are available in the marketplace. You can even approach some instructors so that they can give you an advice about the best course that will be right for you.If you're the ideal in grades, use a chart up within the review room. Plug ins and add ons can also be added for your system to work better. Truly people obtain confused regarding which tattoo supplies is the best as well as which tattoo machines kit to start with is easily the most appropriate for all of them. There are special diets designed specifically for aging dogs to guard against joint problems.
Visit my site锟斤拷http://www.cheapnfljerseyschina-wholesale.us.com/

EnvippinoEnvippino2017/06/21 17:47Young has one year and $16 million left on his contract.65 ERA in 31 appearances. It puts them in a better position regarding taking preventative steps.This is an ancient style in dancing for some Indians that may be known up to their moment. Accessories and shoes are also important components of good style. Wear your hair a little messy, <a href=http://www.cheapnfloutletjerseys.us.com/>Wholesale NFL Jerseys</a>, unbutton your shirt, or wear shoes that don’t perfectly match your outfit. Try the relaxation techniques and breathing exerciThings to consider before buying a tattoo kitHarpold Yoshimura   Submitted 2014-01-01 09:02:29 Prior you get a tattoo done you require to think about all the essential elements that could influence your whole curiosity about a selection of the tattoo design.How To Select The Best Bharatanatyam ClassHow To Select The Best Bharatanatyam ClassNovember 16,<a href=http://www.cheapnfloutletjerseys.us.com/>Cheap Jerseys From China</a>, 2013 Author: Alyce Powell Posted in EducationBharatanatyam Los Angeles has been a very popular Indian dance that belongs to the Southern part of the state.<a href=http://www.cheapnfloutletjerseys.us.com/>Wholesale Jerseys From China</a>. Plug ins and add ons can also be added for your system to work better.”“But this is monstrous!” he exploded.
Visit my sitehttp://www.cheapnfloutletjerseys.us.com/

RichardawameRichardawame2017/10/07 06:09These items turn out to be particularly essential for those who go through any tough patches.Be sure to include an easily-completed unsubscribe link in all of your marketing emails. These real estate buildings are occupied by automobile showrooms as well as theme eateries. <a href=http://www.wholesalejerseyscheaper.com/>Wholesale Jerseys Cheap</a>.Power and magnification are both indispensable, and they should be borne in mind before purchasing a rifle.linkedin.When you are intending on travelling in the coming several weeks,<a href=http://www.wholesalejerseyscheaper.com/>Wholesale NFL Jerseys Online</a>, ensure that your vision out for advertising offers on the web by means of various discounted journey internet sites.Search For Free Indiana Criminal Records OnlineSearch For Free Indiana Criminal Records OnlineAugust 25, 2013 | Author: Christopher Evans | Posted in BusinessRecords of arrest in Indiana are opened and can be easily accessed by the local residents of the state. CONTIN?A EN " HOSPITALIZACION DOCMICILIARIA ", INCAPAZ DE VALERSE POR SI MISMA.<a href=http://www.wholesalejerseyscheaper.com/>Wholesale Jerseys Online</a>. Try to click on "Amend" found close to "Tongue" to display the language drop-down menu.com. Usted dice que mi esposa se movi?, de la misma manera en que dijo que en ocho d?as super?a el grave problema que se le caus?. Others, keen to provide their entrepreneurial skills, go crazy about the leadership front.
Visit my site:http://www.wholesalejerseyscheaper.com/

DavidGressDavidGress2017/10/11 18:50Considering the plenty of online shops present today, an individual should be vigilant regarding what store or dealer they is enrolling to. It brings down the quality of your latest news information site and you can get fined by the search engine crawlers because it will be a repetition of content. In fact, <a href=http://www.cheapnfljerseyschinawholesaler.com/>Cheap Authentic NFL Jerseys</a>, the Red Stockings were still practically covered from waist to ankle with knee pants and red socks, which offered better protection than the Sox's skimpy shorts.aitheinhealing. Taking into concerns this truth, buying products online can be of no difficulty. * Keep the top of the battery clean. One could easily try to find their required things in just few seconds.<a href=http://www.cheapnfljerseyschinawholesaler.com/>Cheap Jerseys From China</a>. If this happens, you will require a brand-new car battery replacement to get your vehicle running again.As hydroponic farming is turning out to be more popular, the selling of hydroponic kits has happen to be a thriving business. You consequently do not want those embarrassing moments whenever your friends are existing.<a href=http://www.cheapnfljerseyschinawholesaler.com/>Cheap Vintage Jerseys Sale</a>. You cannot be sure until you get people to come and check the entire premises for the presence of such a chemical. I recommend that you watch the video to gain a better understanding of Lead Generation.
Visit my site:http://www.cheapnfljerseyschinawholesaler.com/

RichardawameRichardawame2017/10/12 14:41Cisco as of late reported that by 2017, 80 percent of all Internet activity will be feature sees. Most lease businesses usually allow about 45, 000 on free usage limits for any duration of three years. Consider the office example discussed earlier: even in two offices with the same hardwood furnishings, both designed for intellectual contemplation, the office with two lamps and reflective finishes on the hardwood will probably seem lighter and larger than an office which relies solely upon a single overhead light for illumination.) Look for a great and trustworthy online store.Someday your midwifery services business might become such a success that you might consider selling it. For example, <a href=http://www.wholesalejerseyscheapnfl.us.com/>Wholesale NFL Jerseys</a>, you can use two different forms of the same sales page and see which one converts more often. But when it comes to PPC, a tip that can prove to be golden for many online marketers is to take it one step at a time.Entertainment optionsHow will you entertain your guests? If the venue has a dance floor, then you can hire a DJ and that pretty much solves the entertainment aspect. You can possibly get a hold of the services workout psychologist and up a scheduled appointment with ease. Here are things you should do to find the right people this time.<a href=http://www.wholesalejerseyscheapnfl.us.com/>Wholesale NFL Jerseys Online</a>. Regardless of the truth which the ideologies directing modern styles are similar even in the dining space furnishings, person requirements is often captured inside the customized sorts of the dining space furniture.<a href=http://www.wholesalejerseyscheapnfl.us.com/>Wholesale NHL Jerseys China</a>. Online networking is additionally a key instrument for making new client associations that can blossom into future business.
Visit my site:http://www.wholesalejerseyscheapnfl.us.com/

RichardawameRichardawame2017/10/21 19:48Photo shooting is one among the mainstay of this town. Enjoy here and get back your lost energy by being closer to the nature!Marketing To Achieve All Of Your Furniture Retail Business GoalsMarketing To Achieve All Of Your Furniture Retail Business GoalsApril 10, 2013 Author: Adam Stossel Posted in Business” Furniture Retail Business as usual” is not expand rate that a custom furniture retail business owner wants, <a href=http://www.wholesalechinajerseysnflcheap.com/>Wholesale Jerseys</a>,<a href=http://www.wholesalechinajerseysnflcheap.com/>Cheap Jerseys Free Shipping</a>, it’s a healthy one. The trendy still and video production los angeles california have all the facilities in the photography world. Photography is the most typical business within the Hollywood city. A wholesale merchant can gain great measure of cash in a short compass of time in the event that he has the self-control to do as such. Most of these products can last up to several years without any repair. Entry into the business you start at a Director level for a cost of $299.<a href=http://www.wholesalechinajerseysnflcheap.com/>Wholesale NFL Jerseys Free Shipping</a>.Have a jingle written by a songwriter. Presentation is additionally very crucial. Use online resourcesWith great online tools such as Angie’s List, you can find and compare handyman services quickly and easily. Make it catchy and irresistible. Seventy five percent of the assignment is done if she is won impartially.
Visit my site??http://www.wholesalechinajerseysnflcheap.com/

grouptuffgrouptuff2017/11/24 10:09It reduces the frequency of bowel movements. Scott Brash, Peter Charles, Ben Maher and Nick Skelton were the winners after a jump-off (the riding equivalent of a penalty shoot out) between Team GB and the Netherlands.So if one is curious as to what the services they offer are, then take a look at this list. This specific meal needs to consist of at the least six-hundred calories and contain protein, choline, nutrients and vitamins. From there the situation soon spirals unable to cope and sees Sinbad along with his brother (and partner in crime) arrested from the city guards and brought before Lord Akbari, who decides the fastest way to avenge his son's death is usually to make Sinbad watch since he executes his buddy. Now do take note that there are so many more services from different firms. At first look, this first analysis shows the new technology provides a more economical running encounter. Wicker storage baskets come in a variety of shapes and sizes.robinsonsequestrian. Your team colors are displayed on it in light weight fabric. <a href=http://www.adidasnmduk.co.uk/>adidas uk</a>.<a href=http://www.adidasnmduk.co.uk/adidas-tubular-c-9.html>adidas originals tubular women</a>.<a href=http://www.adidasnmduk.co.uk/adidas-gazelle-c-4.html>adidas gazelle men</a>. The simple to slightly more complex means to advertise your search engine marketing services company name is all out there. If you truly want to look sexy in your swimwear then you閳ユ獟l want to make sure to consider having a great pair of sandals to enhance your look.
Visit my site锛歨ttp://www.adidasnmduk.co.uk/

EnvippinoEnvippino2017/11/24 11:12How to Advertise Storage Baskets to your Customers 1. All creators and companies should be aware of the scope of their rights before they draw up or agree to a licensing agreement.Although Mr Hernandez remains as one of the share holders with The Berkley Group , <a href=http://www.adidasnmduk.co.uk/>adidas women originals</a>,in 2007 decided to leave The Berkley Group to dedicate himself full time to the development and growth of the Tropicalaser brand. Most studio art classes have recently incorporated computer graphics and software packages into their curricula. Extractum Bryophyllum Calycinum or Hemsagar in this formulation is well known for curing piles, stomachache, constipation and itchiness. Wicker baskets are stylish,<a href=http://www.adidasnmduk.co.uk/adidas-gazelle-c-4.html>green gazelles</a>, unique and are built with high quality workmanship, ensuring longevity and customer satisfaction. Once you find that out, it is easy to start working on the problem. Go to legend leasing when you want to find out more regarding financing a car without having ever dealing with the dealership.A contemporary exampleAmerican companies lose tens of billions of dollars each year due to software piracy.Tropicalaser is positioned as a value leader with the same quality as more expensive competitors.Exactly during which time cheats go inCouple having to do with an individual if any, relish going to be the have to explore have and for redundancies but take heart a lot of times there is that a multi function want both to and from management to learn more about be able to get a multi function complicated is really a great much more than to have as as quickly as possible as doable for more information regarding always make sure that going to be the organisation can excersice on Managers ought to ensure they are educated in the reality it however following going to be the suitable guidelines will take a little longer than do nothing more than handing out and about redundancy notices words the selection process can bring benefits to learn more about going to be the boss about whether or not performed appropriately. Constipation is also common in pregnant women but it goes away after their delivery.<a href=http://www.adidasnmduk.co.uk/adidas-stan-smith-c-7.html>stan smith sale</a>.
Visit my site锛歨ttp://www.adidasnmduk.co.uk/

RichardawameRichardawame2017/11/24 14:12It has the largest democracy in the world, after it obtained its independency in 1947; it made a big progress in all fields of human activity. Mumbai, also originally known as Bombay, it is one of the most famous, bustling, cosmopolitan cities in India. The earliest school of medicine known to humankind was Ayurveda.Lawyers are really helpful when you are involved in a legal matter as they are helpful to get you out of trouble. <a href=http://www.cheapjerseysnflwholesalechina.us.com/>Cheap Wholesale Jerseys</a>.Some time we need agents for dealing when we have to purchase some huge product, but if make deal online we can get a big collection and we can choose any thing which we want some time on shop we get product which we don’t want but in online deal we can know at our home only that product which we want is available or not. The earliest school of medicine known to humankind was Ayurveda..In addition, it is worth to see the smallest state in India, Goa.. It's crucial to you that you have the appropriate information and that is is portrayed in a clear and concise manner. Doing investigation into these plans can enable you save income on health insurance. Es incre?ble la facilidad conque se puede enga?ar a una persona y la forma en que el tiempo se puede " congelar " para que 8 d?as se conviertan en 5 meses, posiblemente en 6, 7,<a href=http://www.cheapjerseysnflwholesalechina.us.com/>Cheap Jerseys From China</a>,<a href=http://www.cheapjerseysnflwholesalechina.us.com/>Cheap Jerseys Wholesale</a>, 8.
Visit my site:http://www.cheapjerseysnflwholesalechina.us.com/

grouptuffgrouptuff2017/12/02 19:52In order to be considered a good SEO services business, it is important to do follow-ups. <a href=http://www.sabocharmsuk.co.uk/thomas-sabo-rings>thomas sabo rings sale</a>. Art history classes will be very helpful as well.<a href=http://www.sabocharmsuk.co.uk/>thomas sabo bracelet uk</a>.On the run by his home town associated with Basra and under a curse for just a killing that led to the death of his much-loved frankly, the streetwise Sinbad finds out himself cast out that will sea.Article From Article Directory DatabaseWatch Sinbad- Episode 5 S-01 Episode-5Recently on Sinbad Season one Episode 4 "Old Man of the Sea", There are surprises in store after Sinbad and the gang board an left behind ship and meet a vintage man who isn't seeing that sweet as he first appears. It will likewise be advantageous to consider premedical courses if you plan to focus on a medical illustrating niche. Apple won the suit and Psystar agreed to pay $2.These more complicated agreements often include recurring or monthly lease payments. This will give you a better idea of how the industry works and help you to be more successful when you do launch your search engine marketing services company. Thus,<a href=http://www.sabocharmsuk.co.uk/>thomas sabo charm bracelets</a>, it is always crucial that you put good attention about this part of your own arm and do appropriate tricep workout. So, if you want to maintain your physique and get in great shape then seek the guidance of an specialist because without it, you will shed your way. Choose the one that fits the image of your company and the expenses you can take. The male had his heart attack about that time.
Visit my site锛歨ttp://www.sabocharmsuk.co.uk/

DavidGressDavidGress2017/12/07 20:49However, the good thing about such furniture lies in their ability of creating wonders to an otherwise dull looking living room. Once the customers install the app, they can stay engaged in all respects.All the assignments that you would like to have help from the online site are handled by tutors who have PhD degrees in the subject and are experts in doing assignments in the particular subjects helping out students from 12th grade to the graduate levels.An increasing number of corporations, like IG Index, have skilled a lift within the proportion of transactions from iPhone or other mobile phone software platforms. A most significant endorsing position with devoted internet hosting applications is moreover which manage panel in direction of employ the service of. Cycles accomplish in accordance with various types of sports such as mountain biking, <a href=http://www.wholesalenfljerseyscheap.com/>Cheap Jerseys Wholesale</a>, Freestyle bicycles, motorcycles, etc. It might imply the close of your manufacturing vocation or the worst omission that your self contain at any time finished. Rising costs regarding Mumbai's real estate gets recurrently manufactured media. When your content is hard to read, people may not read it.Your Age.<a href=http://www.wholesalenfljerseyscheap.com/>Cheap Jerseys Free Shipping</a>.<a href=http://www.wholesalenfljerseyscheap.com/>Wholesale NFL Jerseys China</a>. You should be careful to use easy words and shorter paragraphs to make your article more user friendly.imgur.
Visit my site:http://www.wholesalenfljerseyscheap.com/

DavidGressDavidGress2017/12/29 08:12Author Resource: In the event you will need additional info just follow this :Louboutin ShoesNike DunksB Brian AtwoodArticle From Article Directory DatabaseWe rely heavily on electrical appliances to get through our days, from alarm clocks, toasters, George Forman Grills, and televisions. The outcome was development of a show of apps did fair what software development did, but which equipped the fashionable phone attributes.Each and every state has different laws for the roofers.5 inch. <a href=http://www.wholesalecheapnflsportsjerseys.com/>Wholesale Basketball Jerseys From China</a>. sports management salary, sports management. This can also be an important piece of equipment that can offer piece of mind at home and in the work place. These sports management programs equip you with standard conduite and leadership knowledge. Permit us look at a several of your alternatives to enter the subject. This done, it is time for someadvertising. I consider safety cameras ought to verify all baggage that will go onto the airplanes before they take off. Stretch your arms upwards, and at the same time,<a href=http://www.wholesalecheapnflsportsjerseys.com/>Wholesale Jerseys Cheap</a>, come up onto your toes if you can do so without pain.<a href=http://www.wholesalecheapnflsportsjerseys.com/>Cheap Basketball Jerseys</a>.Locating and hiring a quality roofer is the most important early step towards successful completion of your improvement project.
Visit my site:http://www.wholesalecheapnflsportsjerseys.com/

RichardawameRichardawame2018/01/03 03:05Compact Luxury:The Mercedes Benz A Class compact luxury cars include the A 180 Sport and the A 200 CDI Sport. Shockingly, Reputation harm might rise up out of obviously minor issues which can break down quite rapidly with notice or plan of action.There are several tips that you will get at the centers. Individuals these days are very much weight conscious but this realization dawns on them only if they end up bitten through overweight issues and this is when they appear for solutions such as sauna for weight loss.Once just one go through an story made, which destination optional of course, a particular will probably give up status online, vote regarding games that you would like or hate, <a href=http://www.cheapnfljerseysdiscount.us.com/>Cheap NFL Jerseys China Online</a>, trust your statistics effectively, see clearly how numerous hours you have used up playing a doll additionally your include large scores. Everything has been gone through with a fine tooth comb. Along with that infant clothing’s are also to be changed at times.In the world of Ayurveda, India has a prominent position. You cannot deny the fact that there is also efficiency when you decide to use this.If they can no longer service you anymore. Often the league started out on April per day, 1996,<a href=http://www.cheapnfljerseysdiscount.us.com/>Cheap Jerseys China Online</a>,<a href=http://www.cheapnfljerseysdiscount.us.com/>Wholesale Jerseys</a>, because the women's opposite number to the Nationwide Basketball Relationship (NBA).The league began having eight clubs: the Charlotte now Sting, Cleveland Rockers, Des moines Comets and New york city Liberty inside Eastern Discussion; and also the Are usually Initiates, Tempe Mercury, Sacramento Nobles and Ut Starzz in the Western Conference.
Visit my site:http://www.cheapnfljerseysdiscount.us.com/

DavidGressDavidGress2018/01/03 19:39Over the years, it has given a lot of things.Throughout 1999, the particular league's chief competition, the Usa Basketball Addition, creased folded. <a href=http://www.wholesalenfljerseyscheap.com/>Wholesale Jerseys Free Shipping</a>.<a href=http://www.wholesalenfljerseyscheap.com/>Wholesale NFL Jerseys</a>. Dresses for kids come in large varieties of colors and sizes. At the center, you will also get to know that the signalman at the ground should be in a good view and directly in front so that you get a clear view of what you are loading.<a href=http://www.wholesalenfljerseyscheap.com/>Cheap Jerseys China</a>.Go ahead and make that call today. Research the particular person desires of your enterprise and which obtaining company would in shape individuals requirements. These days people entailing Kolkata be beneficial in terms of Aster Home Duties considering the fact that is usually frequently residential property specifics or simply self sufficient townships.In this system electromagnet, rays fall on the infrared range transferring energy in to heat.If you live in the UK, there is even the best web hosting companies for you to discover. Listing integration: Maximum NGFWs consists of listing guidance generating handle of authorised packages dependent upon customers and consumer types. This is important because nowadays many companies are not taking in people who do not have these licenses.They is going to standard stay thrilling indicative parents, lord will ultimately tend closer to link within also strive beneath the teenager playfully.
Visit my site:http://www.wholesalenfljerseyscheap.com/

DavidGressDavidGress2018/01/11 20:24In other words you will be saved from a lot of hassle and hazard. Basketball Women's Countrywide Team within the 1996 Summer season Olympics, the actual WNBA began their first season upon June 21 years old, 1997 in order to little bande. A significant range entailing Brand new Home Work within Kolkata are generally achieving constantly be does learn to the real well being demanding home consumers simply because of the fact wherever house organization which includes Kolkata influences achieving a lot dilemma given that Kolkata will be considereded as the powerful region for the within just Eastern Indian. <a href=http://www.cheapnbajerseyschinashop.com/>Cheap NBA Jerseys Free Shipping</a>.com aster shree garden srirampur hooghly by aster group review "target="_blank">Aster Shree Garden Kolkata< a>< strong>< em> .com nCLOSXF. The following are the programs to look out for: inspection methods, IT aids, emergency procedures, blind lift lessons, rig practicing as well as load charting. This is why this is done for you. The free of charge variation deals a fresh cloud based mostly detection motor named ETHOS,<a href=http://www.cheapnbajerseyschinashop.com/>Cheap Jerseys Free Shipping</a>, a heuristics motor that promotions upon require scanning,<a href=http://www.cheapnbajerseyschinashop.com/>Wholesale Jerseys Cheap</a>, within just product or service upgrades, a visible illustration of the Immunet neighborhood, a tranquil gaming manner, and a movement in opposition to the Immunet basic safety weblog.Card games as well as casino games be rivals involving the second surface one time it comes near interest, moreover the agenda of titles in a position would transfer a bin of treatment towards pen here, need to we annoy trying.Some tires are also studded in order to get special traction for the winter road conditions.To enroll in the best school, firstly you will need to ask the syllabus given at that school. Know what the age restrictions are and be aware where you are and are not allowed to operate the vehicle within the bounds of the law.
Visit my site:http://www.cheapnbajerseyschinashop.com/

RichardawameRichardawame2018/01/25 00:40He is the state dog of Wisconsin. It goes without saying that your listing will certainly adore you for it! This is attraction marketing at its ideal. It is normal to have at least a one inch throw and on the strike side, they should have a security plate. Healthcare Astrology is actually part of celestial technology that primarily consists of the actual affects associated with Constellations, zodiac indicators as well as Exoplanets.Always remember the buying cycle in your attempt to generate leads. <a href=http://www.cheapwholesalenflnikejerseys.us.com/>Cheap NFL Jerseys From China</a>.<a href=http://www.cheapwholesalenflnikejerseys.us.com/>Wholesale Jerseys China Free Shipping</a>.Env??? manejo impuestos: Al tratar de encontrar una gran oferta en sus botas UGG, aseg???ese de factor en el gasto adicional de env???, manipulaci??? y en su caso, impuestos. This is mainly very important for people who go on a camping trip might look for a sanctuary in case of bad weather.But on Friday, Banah reported in Chapter 11 filings that it owes between $1,000,000 and $10,000,000 to 232 people and companies, according to the Miami Herald, and has just 15 employees. Coat colors are a range of browns including liver or chocolate and sometimes black.It’s virtually like being a children in a sweet shop, and you just want to dive in and attempt everything! You are so enthusiastic that you have accessibility to this gold info that you may want to execute every advertising approach concurrently.Along with the valuable trainings that you provide free access to your customers, there is also a considerable and extensive collection for it’s members in the MLSP back office, which is jam packed loaded with the most recent and biggest cutting edge marketing strategies.<a href=http://www.cheapwholesalenflnikejerseys.us.com/>Wholesale Jerseys Cheap</a>. Make sure you respond to each email and phone call.//////////

DavidGressDavidGress2018/02/01 12:14You will experience significantly better once you get started moving toward your life.Requesting for a copy of a Florida arrest record is not only to check the background of the people we meet online but also the people who are around us like neighbors, relatives and even our friends. Designed to be modular in nature, easily configurable, and platform independent, this highly scalable solution satisfies the needs of any size warehouse. The body wants the man to continue to sleep uninterrupted, and since urinating while tumescent is difficult, <a href=http://www.cheapoutletjerseys.us.com/>Cheap NFL Jerseys From China</a>, the body produces the tumescence to keep the man from urinating in his sleep. Be certain the temperatures inside your fridge is placed between 38-42 degrees (F) and in your freezer to -5 degrees (F). Thus,<a href=http://www.cheapoutletjerseys.us.com/>Cheap NFL Jerseys Free Shipping</a>, a massive amount of World wide web savvy individuals don’t search for the web link to the website; they right click on the logo. The Club Hotel & Spa, the Bohemia and the Apollo, all of them Jersey hotels owned by the Huggler Group. List suggests, ??hen distribution center operations evolve because of environmental and ethical pressure, the QC Enterprise will adapt as well as provide a cost-effective solution. This will leave you prepared for both opportunities, as well as obstacles you may run into. Get The Right Professional For Tube Amplifier RepairGet The Right Professional For Tube Amplifier RepairOctober 17,<a href=http://www.cheapoutletjerseys.us.com/>Cheap Jerseys From China</a>, 2013 Author: Rhea Solomon Posted in EducationWhen looking for good tube amplifier repair services, it always is important to ensure that the right ones are found. Payment plans and rates differ from one finance company to another.Access to social networking sites is now popular and it is used by many to interact with their friends and unknowingly become victims of assaults at some point.
Visit my site??http://www.cheapoutletjerseys.us.com/

RichardawameRichardawame2018/02/02 22:54•Proofread your content: The most important thing is to proofread your final flyer content by someone else.•Design flyers on the basis of target audience: It is important to consider the target audience while designing a flyer.Opaque violet tinted contacts are the very best coloured contacts for folks who are looking to completely change their eye colors. It also boosts potency of women and men as well. <a href=http://www.wholesalenfljerseyscheap.com/>Cheap Jerseys From China</a>.In case you are not capable of understand and join with your audience, your social media networking efforts will likely be in vain.Thirdly, he or she should provide cost effective treatment which is long lasting and does not require unnecessary routine checkups. Including tote bags , lanyards, and other promo products with your letters can often increase leads, as well as including incentives, eye catching headlines, and targeting the right audience. The regular regimen of exercise among men, women, and children are sure to improve blood circulation in the body as well as movements of joints so that nerves looseness along with the body muscles.<a href=http://www.wholesalenfljerseyscheap.com/>Cheap Jerseys</a>.Determine if this is a new color change, or if it is to maintain color on root growth.The flavonoids in full in the leaves, flowers, and fruits of Gokhru, which all do away symptoms of weakness and fatigue.•Design flyers on the basis of target audience: It is important to consider the target audience while designing a flyer.<a href=http://www.wholesalenfljerseyscheap.com/>Cheap Jerseys China</a>. Instead, find list brokers who will sell contact information for specific groups of individuals that are more likely to appreciate and become involved in the business.
Visit my site:http://www.wholesalenfljerseyscheap.com/

FreddiegeownFreddiegeown2018/02/03 00:37Because Lightbox is online TV, it's ideal for watching on your iPad or laptop. But for a Good news then that it's so easy to connect to the big screen. And there Watch your favourite episodes of Celebrity Ghost Stories online. Lightbox has the TV shows you want. Start your 30 day free trial now.
http://watchtvonline.io/season/micky-flanagan-thinking-aloud-season-s1-premiere-watch-date/ - go to this site
watch series online,watch tv shows online, watch full episodes,watch series, watch 9x7 | Rip Off Britain - Episode 7 2017-05-09 В· 7x84 | Conan - Amanda Peet, Watch The Fall Online | Full Length Episodes. A seemingly cold but very passionate policewoman goes head to head with a seeming passionate father who is in

RichardawameRichardawame2018/02/10 04:20In the course of this period, 4 generations of the Rauschenbach family dominated IWC with totally various names. <a href=http://www.wholesalesportsjerseyscheap.us.com/>Wholesale NFL Jerseys Online</a>. If you find that you are besieged by flies or bugs are driving you up the wall just pick up the phone and dial the number of Pest Control Companies London that know what to do in times of emergency. Mice aren't nice when they invade your home so say goodbye to the furry little fiends and get Pest Control Companies London on the case. Translation of a document from English to Indonesian ought to be cost-efficient at an equivalent time. Don’t consider if pregnant or nursing without 1st speaking to your medical doctor. Before discussing spousal support and distribution of assets,<a href=http://www.wholesalesportsjerseyscheap.us.com/>Wholesale NFL Jerseys China</a>, each spouse must reveal budgetary needs and available income. You can see it printed out in bold color white and black everything there is to understand about the other person if you discover yourself needing evidence. At the identical process,heading for being the hair specialists are depending on how long a whole lot additional all around the planning to get the hair scissors to enhance the their experience fluctuate widely.You can visitJohnson Online.<a href=http://www.wholesalesportsjerseyscheap.us.com/>Wholesale NFL Jerseys Free Shipping</a>.and that is not a good thing.Here is fight card for the UFC LiveCruz vs.
Visit my site??http://www.wholesalesportsjerseyscheap.us.com/

2008-12-27

ファイルの最初の3行だけ読む

15:54

ファイルの入出力を学習しました。

#! /bin/perl -w
use strict;

my $filename = 'data.txt';
open (FILE, $filename) or die "$filename: $!";
for (my $i=0; $i<3; $i++) {
	my $line = <FILE>;
	print $line;
}
close (FILE);

複数のファイルを処理できれば、簡易プレビューできそうです。バイナリファイルだった場合に、最初の数行で中身の判別とかはできるのか、わからないですけど。

 

はてなスターありがとうございます。tokumuraさん。

2008-12-13

クリスマスツリーを書く

| 16:41

時期的にも合うのでこのクイズを解いてみました。

このようなクリスマスツリーを書くプログラムを作るという課題です。

     *
    *!*
   *!*!*
  *!*%*!*
 *!*%/%*!*
*!*%/*/%*!*
              *
             *!*
            *!*!*
           *!*%*!*
          *!*%/%*!*
         *!*%/+/%*!*
        *!*%/+-+/%*!*
       *!*%/+-!-+/%*!*
      *!*%/+-!.!-+/%*!*
     *!*%/+-!.*.!-+/%*!*
    *!*%/+-!.***.!-+/%*!*
   *!*%/+-!.**%**.!-+/%*!*
  *!*%/+-!.**%/%**.!-+/%*!*
 *!*%/+-!.**%/*/%**.!-+/%*!*
*!*%/+-!.**%/*+*/%**.!-+/%*!*

 

最初に考えたのは

#! /bin/perl -w
use strict;

my @takasa = ('6', '16',);
my @parts = qw(* ! * % / * + - ! . * * % / * +);

foreach my $h(@takasa){
	for (my $i = 1; $i <= $h; $i++){
		print ' ' x ($h - $i);
		for (my $m = 0; $m < $i; $m++){
			print $parts[$m];
		}
		for (my $n = ($i - 2); $n >= 0; $n--){
			print $parts[$n];
		}
		print "\n";
	}
	print "\n";
}

forループで右側+中央と左側をprintするのを高さ分だけ繰りかえす2重ループ

 

次にヒントありでできたのが

#! /bin/perl -w
use strict;

my @tree = ('*!*%/*', '*!*%/+-!.**%/*+'); #葉
foreach (@tree) {
	my @leaf = split(//, $_);
	my @branch = ();
	while (@leaf) {
		my $center = shift(@leaf);
		print " " x @leaf, @branch, $center, reverse(@branch), "\n";
		push (@branch, $center);
	}
}

すっきりできました。

解答は結城浩の『Perlクイズ』 [まぐまぐ!]にありますが、2文で出来るとはびっくりです。まだ、学んでいない関数を使ってるとはいえ驚きました。

2008-12-08

シェバング行

23:35

スクリプトファイルの1行目に書く #! の付く行をシェバング行という。

もともとはUNIXの習慣で、ファイルの中身をシェバング行のコマンドに渡す。

#! /bin/perl

これだと、2行目以降がperlコマンドに渡される。

 

WindowsのActivePerlの場合は、意味がないかというと、そんなことはなくて、-d でデバッガーを実行したり、-w で警告をオンにしたりできる。

Perlのスクリプトであることがわかりやすいのでつけたほうがよい。

 

あまり意味はないけれど、-c や -v などもここに記述すると効果がある。

"-c" は文法チェックしてくれる。けれど、シェバング行に記述するよりもコマンドでオプションで渡したほうがいいですね。

"-v" はバージョンを表示するだけで中身のスクリプトは実行されないので意味なしでした。

 

スクリプトの書き出しはこれのほうがよさそう。

#! /bin/perl -w
use strict;
use warnings;

use warnings; は1行目に "-w" を記述しておけばいらないような気もする。

 

はてなスターありがとうございます。tokumuraさん。

2008-12-07

うるう年かどうかチェックする。

| 19:30

練習問題として、任意の年($year)がうるう年かどうかチェックするというのを考えてみました。

うるう年の判定条件は、

4で割り切れる年はうるう年

しかし、100で割り切れる年はうるう年ではない

しかし、400で割り切れる年はうるう年

最初に書いたスクリプト

use strict;
use warnings;

my $year = "2008"; #ここに調べたい年を入れる
if ($year % 4 != 0) {
	print "$year年はうるう年ではない\n";
} elsif ($year % 100 == 0) {
	if ($year % 400 == 0) {
		print "$year年はうるう年\n";
	} else {
		print "$year年はうるう年ではない\n";
	}
} else {
	print "$year年はうるう年\n";
}

わかりにくいです。条件が複数ある場合は、一番厳しい条件から書いたほうが良いとのことで、この場合は、400で割り切れるかどうかを最初に判定すると、

use strict;
use warnings;

my $year = "2008"; #ここに調べたい年を入れる
if ($year % 400 == 0) {
	print "$year年はうるう年\n";
} elsif ($year % 100 == 0) {
	print "$year年はうるう年ではない\n";
} elsif ($year % 4 == 0) {
	print "$year年はうるう年\n";
} else {
	print "$year年はうるう年ではない\n";
}

こちらのほうがわかりやすくなりました。

 

ネットでみつけた、シンプルな解答

use strict;
use warnings;
 
my $year = "2008"; #ここに調べたい年を入れる
if ($year % 400 == 0 or ($year % 100 != 0 and $year % 4 == 0)) {
	print "$year年はうるう年\n";
} else {
	print "$year年はうるう年ではない\n";
}

わかりやすいです。

 

追記

トラックバックいただきました。

「うるう年かどうかチェックする」をif~elseを使わずに書いてみた - ishiducaの日記 - Hatena::Group::Perl

うるう年 - negipoのPerl日記 - Hatena::Group::Perl

ありがとうございます。

本を読んで勉強中

16:12

新版Perl言語プログラミングレッスン入門編

新版Perl言語プログラミングレッスン入門編

 

この本を読んで勉強中です。わかりやすくてよいと思います。章の終わりに練習問題があって復習できて、いいですね。

初級者向けの練習問題をもう少しやりたいと思うのですがなかなかみつからないものです。自分で問題を考えられるようになりたいです。

 

はてなスターありがとうございます。tokumuraさん。